[pygobject/py3k: 11/20] Use _PyLong and Py_TYPE
- From: John Ehresman <jpe src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pygobject/py3k: 11/20] Use _PyLong and Py_TYPE
- Date: Thu, 15 Apr 2010 17:49:57 +0000 (UTC)
commit 2e1c1f48b9ada382f99206789360f0d39f89bcb5
Author: John Ehresman <jpe wingware com>
Date: Tue Apr 13 12:16:24 2010 -0400
Use _PyLong and Py_TYPE
gio/goutputstream.override | 4 ++--
gobject/pygi-external.h | 2 +-
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;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]