[pygobject] fix a couple of compiler warnings
- From: Tomeu Vizoso <tomeuv src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pygobject] fix a couple of compiler warnings
- Date: Fri, 17 Sep 2010 13:18:51 +0000 (UTC)
commit 2da8da589644d6125101210712defb1272a8abb1
Author: John (J5) Palmieri <johnp redhat com>
Date: Thu Sep 9 13:52:14 2010 -0400
fix a couple of compiler warnings
https://bugzilla.gnome.org/show_bug.cgi?id=629199
gi/pygi-argument.c | 4 ++--
gi/pygi-struct.c | 2 +-
gobject/gobjectmodule.c | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/gi/pygi-argument.c b/gi/pygi-argument.c
index 82d5855..e3dd8c3 100644
--- a/gi/pygi-argument.c
+++ b/gi/pygi-argument.c
@@ -749,7 +749,7 @@ _pygi_argument_from_object (PyObject *object,
}
case GI_TYPE_TAG_UTF8:
{
- const gchar *string;
+ gchar *string;
if (object == Py_None) {
arg.v_string = NULL;
@@ -774,7 +774,7 @@ _pygi_argument_from_object (PyObject *object,
case GI_TYPE_TAG_FILENAME:
{
GError *error = NULL;
- const gchar *string;
+ gchar *string;
#if PY_VERSION_HEX < 0x03000000
string = g_strdup(PyString_AsString (object));
diff --git a/gi/pygi-struct.c b/gi/pygi-struct.c
index caa0ffb..c2e1f4d 100644
--- a/gi/pygi-struct.c
+++ b/gi/pygi-struct.c
@@ -31,7 +31,7 @@ static void
_struct_dealloc (PyGIStruct *self)
{
GIBaseInfo *info = _pygi_object_get_gi_info (
- Py_TYPE((PyObject *) self),
+ (PyObject *) self,
&PyGIStructInfo_Type);
PyObject_GC_UnTrack ( (PyObject *) self);
diff --git a/gobject/gobjectmodule.c b/gobject/gobjectmodule.c
index 804d5b0..4e9c07d 100644
--- a/gobject/gobjectmodule.c
+++ b/gobject/gobjectmodule.c
@@ -1192,7 +1192,7 @@ pyg_type_register(PyTypeObject *class, const char *type_name)
/* set new value of __gtype__ on class */
gtype = pyg_type_wrapper_new(instance_type);
- PyObject_SetAttrString(class, "__gtype__", gtype);
+ PyObject_SetAttrString((PyObject *)class, "__gtype__", gtype);
Py_DECREF(gtype);
/* propagate new constructor API compatility flag from parent to child type */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]