[glom] Fix the build with Python 2.5, bringing back the warnings for others.



commit bb10c8b09c08ad6358b2df6513a41df32677cbd0
Author: Murray Cumming <murrayc murrayc com>
Date:   Thu Jul 23 23:38:34 2009 +0200

    Fix the build with Python 2.5, bringing back the warnings for others.
    
    	* glom/libglom/python_embed/py_glom_record.cc:
    	* glom/libglom/python_embed/py_glom_related.cc:
    	* glom/libglom/python_embed/py_glom_relatedrecord.cc:
    	* glom/libglom/python_embed/pygdavalue_conversions.c: Remove the extra
    	struct field initialization to fix the build with Python 2.5.

 ChangeLog                                          |   10 ++++++++++
 glom/libglom/python_embed/py_glom_record.cc        |    2 +-
 glom/libglom/python_embed/py_glom_related.cc       |    2 +-
 glom/libglom/python_embed/py_glom_relatedrecord.cc |    2 +-
 glom/libglom/python_embed/pygdavalue_conversions.c |    2 +-
 5 files changed, 14 insertions(+), 4 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index b0cb020..5926015 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2009-07-23  Murray Cumming  <murrayc murrayc com>
+
+	Fix the build with Python 2.5, bringing back the warnings for others.
+
+	* glom/libglom/python_embed/py_glom_record.cc:
+	* glom/libglom/python_embed/py_glom_related.cc:
+	* glom/libglom/python_embed/py_glom_relatedrecord.cc:
+	* glom/libglom/python_embed/pygdavalue_conversions.c: Remove the extra 
+	struct field initialization to fix the build with Python 2.5.
+
 2009-07-23  Daniel Elstner  <danielk openismus com>
 
 	Make libegg object files depend on eggmarshalers
diff --git a/glom/libglom/python_embed/py_glom_record.cc b/glom/libglom/python_embed/py_glom_record.cc
index befb7cc..e65804a 100644
--- a/glom/libglom/python_embed/py_glom_record.cc
+++ b/glom/libglom/python_embed/py_glom_record.cc
@@ -295,7 +295,7 @@ static PyTypeObject pyglom_RecordType = {
     (initproc)Record_init,      /* tp_init */
     0,                         /* tp_alloc */
     Record_new,                 /* tp_new */
-    0, 0, 0, 0, 0, 0, 0, 0, 0,
+    0, 0, 0, 0, 0, 0, 0, 0, //TODO: or one more 0 if using a newer Python.
 };
 
 PyTypeObject* PyGlomRecord_GetPyType()
diff --git a/glom/libglom/python_embed/py_glom_related.cc b/glom/libglom/python_embed/py_glom_related.cc
index 0e180c3..3a12e3b 100644
--- a/glom/libglom/python_embed/py_glom_related.cc
+++ b/glom/libglom/python_embed/py_glom_related.cc
@@ -251,7 +251,7 @@ static PyTypeObject pyglom_RelatedType = {
     (initproc)Related_init,      /* tp_init */
     0,                         /* tp_alloc */
     Related_new,                 /* tp_new */
-    0, 0, 0, 0, 0, 0, 0, 0, 0,
+    0, 0, 0, 0, 0, 0, 0, 0, //TODO: or one more 0 if using a newer Python.
 };
 
 PyTypeObject* PyGlomRelated_GetPyType()
diff --git a/glom/libglom/python_embed/py_glom_relatedrecord.cc b/glom/libglom/python_embed/py_glom_relatedrecord.cc
index a381efc..87341fb 100644
--- a/glom/libglom/python_embed/py_glom_relatedrecord.cc
+++ b/glom/libglom/python_embed/py_glom_relatedrecord.cc
@@ -454,7 +454,7 @@ static PyTypeObject pyglom_RelatedRecordType = {
     (initproc)RelatedRecord_init,      /* tp_init */
     0,                         /* tp_alloc */
     RelatedRecord_new,                 /* tp_new */
-    0, 0, 0, 0, 0, 0, 0, 0, 0,
+    0, 0, 0, 0, 0, 0, 0, 0, //TODO: or one more 0 if using a newer Python.
 };
 
 PyTypeObject* PyGlomRelatedRecord_GetPyType()
diff --git a/glom/libglom/python_embed/pygdavalue_conversions.c b/glom/libglom/python_embed/pygdavalue_conversions.c
index e742877..94c6e41 100644
--- a/glom/libglom/python_embed/pygdavalue_conversions.c
+++ b/glom/libglom/python_embed/pygdavalue_conversions.c
@@ -156,7 +156,7 @@ pygda_value_as_pyobject(const GValue *boxed, gboolean copy_boxed)
     } else if (value_type == G_TYPE_UINT) {
         ret = PyInt_FromLong (g_value_get_uint ((GValue*)boxed));
     } else {
-      g_warning ("G_VALUE_TYPE() returned unknown type %lu", value_type);
+      g_warning ("G_VALUE_TYPE() returned unknown type %u", value_type);
 
       Py_INCREF (Py_None);
       ret = Py_None;



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