diff options
author | Johan Dahlin <johan@src.gnome.org> | 2004-07-17 16:38:46 +0000 |
---|---|---|
committer | Johan Dahlin <johan@src.gnome.org> | 2004-07-17 16:38:46 +0000 |
commit | b889f44c6adeaf10d5e1ae0a2e69ef5ee218ccad (patch) | |
tree | 6db2e280696773afe0d2d54425441ed1abc5ee4b /gobject/pygtype.c | |
parent | 8238d9cc0fce600328f50efa139db1f575058ae8 (diff) | |
download | pygobject-b889f44c6adeaf10d5e1ae0a2e69ef5ee218ccad.tar.gz |
gtk/*.override
* gtk/*.override
* codegen/codegen.py:
* codegen/argtypes.py: Update for enums
* pygtype.c (pyg_value_as_pyobject): Use new enum/flag functions
* pygenum.[ch]: Handle GFlag
* pygflags.[ch]: Handle GFlag
* atk-types.defs: Fix gtype-id for all enums
* gobjectmodule.c (initgobject): Clean up and add convinience macros
* tests/enum.py: New file
* tests/common.py: New file, also stole from gst-python
Diffstat (limited to 'gobject/pygtype.c')
-rw-r--r-- | gobject/pygtype.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/gobject/pygtype.c b/gobject/pygtype.c index e28c84c1..eff5e0df 100644 --- a/gobject/pygtype.c +++ b/gobject/pygtype.c @@ -22,6 +22,9 @@ #include "pygobject-private.h" +#include "pygenum.h" +#include "pygflags.h" + /* -------------- __gtype__ objects ---------------------------- */ typedef struct { @@ -652,9 +655,9 @@ pyg_value_as_pyobject(const GValue *value, gboolean copy_boxed) return PyLong_FromUnsignedLongLong(val); } case G_TYPE_ENUM: - return PyInt_FromLong(g_value_get_enum(value)); + return pyg_enum_from_gtype(G_VALUE_TYPE(value), g_value_get_enum(value)); case G_TYPE_FLAGS: - return PyInt_FromLong(g_value_get_flags(value)); + return pyg_flags_from_gtype(G_VALUE_TYPE(value), g_value_get_flags(value)); case G_TYPE_FLOAT: return PyFloat_FromDouble(g_value_get_float(value)); case G_TYPE_DOUBLE: |