[gimp] plug-ins/pygimp: Cast PyMappingMethods.mp_length to lenfunc



commit d40984f505e9ed703f87704f642dca002caf506d
Author: Martin Nordholts <martinn src gnome org>
Date:   Fri Sep 3 08:12:05 2010 +0200

    plug-ins/pygimp: Cast PyMappingMethods.mp_length to lenfunc
    
    From Pyton 2.5 - which is the minimum Python version we require - the
    type of the mp_length member in PyMappingMethods is lenfunc, not
    inquiry. Fix this to get rid of "initialization from incompatible
    pointer type" warnings.

 plug-ins/pygimp/pygimp-pdb.c  |    2 +-
 plug-ins/pygimp/pygimp-tile.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/plug-ins/pygimp/pygimp-pdb.c b/plug-ins/pygimp/pygimp-pdb.c
index 865541b..84995d0 100644
--- a/plug-ins/pygimp/pygimp-pdb.c
+++ b/plug-ins/pygimp/pygimp-pdb.c
@@ -667,7 +667,7 @@ pdb_subscript(PyGimpPDB *self, PyObject *key)
 }
 
 static PyMappingMethods pdb_as_mapping = {
-    (inquiry)0,			/*mp_length*/
+    (lenfunc)0,			/*mp_length*/
     (binaryfunc)pdb_subscript,	/*mp_subscript*/
     (objobjargproc)0,		/*mp_ass_subscript*/
 };
diff --git a/plug-ins/pygimp/pygimp-tile.c b/plug-ins/pygimp/pygimp-tile.c
index 36fbe12..cb71f24 100644
--- a/plug-ins/pygimp/pygimp-tile.c
+++ b/plug-ins/pygimp/pygimp-tile.c
@@ -875,7 +875,7 @@ pf_ass_sub(PyGimpPixelFetcher *self, PyObject *v, PyObject *w)
 }
 
 static PyMappingMethods pf_as_mapping = {
-    (inquiry)pf_length,
+    (lenfunc)pf_length,
     (binaryfunc)pf_subscript,
     (objobjargproc)pf_ass_sub,
 };



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