summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Ehresman <jpe@wingware.com>2010-04-13 12:16:24 -0400
committerJohn Ehresman <jpe@wingware.com>2010-04-15 12:16:49 -0400
commit2e1c1f48b9ada382f99206789360f0d39f89bcb5 (patch)
treec9d53279b4a2dbbc41462cf27e26216e99412f96
parentef1eb49d5e29630d998517c5d1e93dde03a004ef (diff)
downloadpygobject-2e1c1f48b9ada382f99206789360f0d39f89bcb5.tar.gz
pygobject-2e1c1f48b9ada382f99206789360f0d39f89bcb5.tar.xz
pygobject-2e1c1f48b9ada382f99206789360f0d39f89bcb5.zip
Use _PyLong and Py_TYPE
-rw-r--r--gio/goutputstream.override4
-rw-r--r--gobject/pygi-external.h2
2 files changed, 3 insertions, 3 deletions
diff --git a/gio/goutputstream.override b/gio/goutputstream.override
index 337a84c..04af1ca 100644
--- a/gio/goutputstream.override
+++ b/gio/goutputstream.override
@@ -51,7 +51,7 @@ _wrap_g_output_stream_write(PyGObject *self,
if (pyg_error_check(&error))
return NULL;
- return PyInt_FromLong(written);
+ return _PyLong_FromLong(written);
}
%%
override g_output_stream_write_all kwargs
@@ -85,7 +85,7 @@ _wrap_g_output_stream_write_all(PyGObject *self,
if (pyg_error_check(&error))
return NULL;
- return PyInt_FromLong(written);
+ return _PyLong_FromLong(written);
}
%%
override g_output_stream_write_async kwargs
diff --git a/gobject/pygi-external.h b/gobject/pygi-external.h
index aec2f25..02e6656 100644
--- a/gobject/pygi-external.h
+++ b/gobject/pygi-external.h
@@ -39,7 +39,7 @@ _pygi_import (void)
Py_DECREF(module);
Py_DECREF(api);
PyErr_Format(PyExc_TypeError, "gi._API must be cobject, not %s",
- api->ob_type->tp_name);
+ Py_TYPE(api)->tp_name);
return -1;
}