[pygobject] cast params for PyObject_IsInstance to suppress warnings
- From: John Palmieri <johnp src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pygobject] cast params for PyObject_IsInstance to suppress warnings
- Date: Tue, 13 Sep 2011 20:21:19 +0000 (UTC)
commit 24b920f9922e367bdb8b3e56c2f61e0c8f5cdb66
Author: John (J5) Palmieri <johnp redhat com>
Date: Tue Sep 13 16:20:48 2011 -0400
cast params for PyObject_IsInstance to suppress warnings
gi/_gobject/pygobject-private.h | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gi/_gobject/pygobject-private.h b/gi/_gobject/pygobject-private.h
index 0166825..dabf0a4 100644
--- a/gi/_gobject/pygobject-private.h
+++ b/gi/_gobject/pygobject-private.h
@@ -184,7 +184,7 @@ typedef struct {
extern PyTypeObject PyGFlags_Type;
-#define PyGFlags_Check(x) (PyObject_IsInstance(x, &PyGFlags_Type) && g_type_is_a(((PyGFlags*)x)->gtype, G_TYPE_FLAGS))
+#define PyGFlags_Check(x) (PyObject_IsInstance((PyObject *)x, (PyObject *)&PyGFlags_Type) && g_type_is_a(((PyGFlags*)x)->gtype, G_TYPE_FLAGS))
extern PyObject * pyg_flags_add (PyObject * module,
const char * type_name,
@@ -194,7 +194,7 @@ extern PyObject * pyg_flags_from_gtype (GType gtype,
int value);
/* pygenum */
-#define PyGEnum_Check(x) (PyObject_IsInstance(x, &PyGEnum_Type) && g_type_is_a(((PyGFlags*)x)->gtype, G_TYPE_ENUM))
+#define PyGEnum_Check(x) (PyObject_IsInstance((PyObject *)x, (PyObject *)&PyGEnum_Type) && g_type_is_a(((PyGFlags*)x)->gtype, G_TYPE_ENUM))
typedef struct {
PYGLIB_PyLongObject parent;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]