diff options
author | Simon Feltman <sfeltman@src.gnome.org> | 2014-01-14 12:54:42 -0800 |
---|---|---|
committer | Simon Feltman <sfeltman@src.gnome.org> | 2014-01-14 12:54:42 -0800 |
commit | f2a79904ff4d60bff657bfbfd6a2ce8ab9307848 (patch) | |
tree | a13c2a25d929be5c414f2019c0e5feb7811913bf | |
parent | 61b4af05646a8f014cfb00a5507fec2deb9aafa6 (diff) | |
download | pygobject-f2a79904ff4d60bff657bfbfd6a2ce8ab9307848.tar.gz |
Fix Python 2 build warning for module definitions
Define PYGLIB_MODULE_ERROR_RETURN as NULL for both Python 2 and 3. This is
needed now that the function signature created with PYGLIB_MODULE_START is
consistent between the two versions.
-rw-r--r-- | gi/pyglib-python-compat.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/gi/pyglib-python-compat.h b/gi/pyglib-python-compat.h index 5365b208..40e79b42 100644 --- a/gi/pyglib-python-compat.h +++ b/gi/pyglib-python-compat.h @@ -30,9 +30,10 @@ PyCapsule_Import(##module##.##symbol##, FALSE) +#define PYGLIB_MODULE_ERROR_RETURN NULL + /* Compilation on Python 2.x */ #if PY_VERSION_HEX < 0x03000000 -#define PYGLIB_MODULE_ERROR_RETURN #define RO READONLY @@ -113,8 +114,6 @@ PyTypeObject symbol = { \ #else -#define PYGLIB_MODULE_ERROR_RETURN 0 - #define PYGLIB_MODULE_START(symbol, modname) \ static struct PyModuleDef _##symbol##module = { \ PyModuleDef_HEAD_INIT, \ |