[pygobject/py3k] add some needed constants



commit e0729eac9d52f8bc0adce4fcbbb7ada5918bfb81
Author: John (J5) Palmieri <johnp redhat com>
Date:   Thu Apr 15 16:26:18 2010 -0400

    add some needed constants

 gobject/gobjectmodule.c |   16 ++++++++++++++++
 1 files changed, 16 insertions(+), 0 deletions(-)
---
diff --git a/gobject/gobjectmodule.c b/gobject/gobjectmodule.c
index 90b4d1e..8fdcd64 100644
--- a/gobject/gobjectmodule.c
+++ b/gobject/gobjectmodule.c
@@ -2545,6 +2545,22 @@ pygobject_register_constants(PyObject *m)
     PyModule_AddIntConstant(m, "G_MINLONG", G_MINLONG);
     PyModule_AddIntConstant(m, "G_MAXLONG", G_MAXLONG);
     PyModule_AddObject(m, "G_MAXULONG", PyLong_FromUnsignedLong(G_MAXULONG));
+    PyModule_AddIntConstant(m, "G_MININT8", G_MININT8);
+    PyModule_AddIntConstant(m, "G_MAXINT8", G_MAXINT8);
+    PyModule_AddIntConstant(m, "G_MAXUINT8", G_MAXUINT8);
+    PyModule_AddIntConstant(m, "G_MININT16", G_MININT16); 
+    PyModule_AddIntConstant(m, "G_MAXINT16", G_MAXINT16);
+    PyModule_AddIntConstant(m, "G_MAXUINT16", G_MAXUINT16);
+    PyModule_AddIntConstant(m, "G_MININT32", G_MININT32);
+    PyModule_AddIntConstant(m, "G_MAXINT32", G_MAXINT32);
+    PyModule_AddObject(m, "G_MAXUINT32", PyLong_FromUnsignedLong(G_MAXUINT32));
+    PyModule_AddObject(m, "G_MININT64",PyLong_FromLong( G_MININT64));
+    PyModule_AddObject(m, "G_MAXINT64", PyLong_FromLong(G_MAXINT64));
+    PyModule_AddObject(m, "G_MAXUINT64", PyLong_FromUnsignedLong(G_MAXUINT64));
+    PyModule_AddObject(m, "G_MAXSIZE", PyLong_FromUnsignedLong(G_MAXSIZE));
+    PyModule_AddObject(m, "G_MAXSSIZE", PyLong_FromUnsignedLong(G_MAXSSIZE));
+    PyModule_AddObject(m, "G_MINOFFSET", PyLong_FromLong(G_MINOFFSET));
+    PyModule_AddObject(m, "G_MAXOFFSET", PyLong_FromLong(G_MAXOFFSET));
 
     PyModule_AddIntConstant(m, "SIGNAL_RUN_FIRST", G_SIGNAL_RUN_FIRST);
     PyModule_AddIntConstant(m, "SIGNAL_RUN_LAST", G_SIGNAL_RUN_LAST);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]