diff options
author | Tomeu Vizoso <tomeu@sugarlabs.org> | 2009-11-30 10:53:57 +0000 |
---|---|---|
committer | Tomeu Vizoso <tomeu@sugarlabs.org> | 2009-11-30 10:53:57 +0000 |
commit | e7e2fccae36c28c7e9f288fcd4c90a001140e307 (patch) | |
tree | 4c10dfff0d5099cfc02201a9c5f40d8f60aec5fd /gi/pygi-argument.c | |
parent | 05a2ed55f3e5d2620de8b3b6b0d99e928ef3b041 (diff) | |
download | pygi-e7e2fccae36c28c7e9f288fcd4c90a001140e307.tar.gz pygi-e7e2fccae36c28c7e9f288fcd4c90a001140e307.tar.xz pygi-e7e2fccae36c28c7e9f288fcd4c90a001140e307.zip |
Revert "Use the limit constants from glib and interpret G_MAXUINT32 as PyLong_FromLongLong"
This reverts commit 05a2ed55f3e5d2620de8b3b6b0d99e928ef3b041.
Diffstat (limited to 'gi/pygi-argument.c')
-rw-r--r-- | gi/pygi-argument.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/gi/pygi-argument.c b/gi/pygi-argument.c index feae974..8411b62 100644 --- a/gi/pygi-argument.c +++ b/gi/pygi-argument.c @@ -52,21 +52,21 @@ _pygi_g_type_tag_py_bounds (GITypeTag type_tag, *lower = PyInt_FromLong(0); break; case GI_TYPE_TAG_INT32: - *lower = PyInt_FromLong(G_MININT32); - *upper = PyInt_FromLong(G_MAXINT32); + *lower = PyInt_FromLong(-2147483648); + *upper = PyInt_FromLong(2147483647); break; case GI_TYPE_TAG_UINT32: /* Note: On 32-bit archs, this number doesn't fit in a long. */ - *upper = PyLong_FromLongLong(G_MAXUINT32); + *upper = PyLong_FromLongLong(4294967295); *lower = PyInt_FromLong(0); break; case GI_TYPE_TAG_INT64: /* Note: On 32-bit archs, these numbers don't fit in a long. */ - *lower = PyLong_FromLongLong(G_MININT64); - *upper = PyLong_FromLongLong(G_MAXINT64); + *lower = PyLong_FromLongLong(-9223372036854775808u); + *upper = PyLong_FromLongLong(9223372036854775807); break; case GI_TYPE_TAG_UINT64: - *upper = PyLong_FromUnsignedLongLong(G_MAXUINT64); + *upper = PyLong_FromUnsignedLongLong(18446744073709551615u); *lower = PyInt_FromLong(0); break; case GI_TYPE_TAG_SHORT: @@ -1342,7 +1342,7 @@ _pygi_argument_to_object (GArgument *arg, { guint32 value; value = is_pointer ? *(guint32 *)arg->v_pointer : arg->v_uint32; - object = PyLong_FromLongLong(value); + object = PyInt_FromLong(value); break; } case GI_TYPE_TAG_INT64: |