diff options
author | John Ehresman <jpe@src.gnome.org> | 2004-07-05 16:45:58 +0000 |
---|---|---|
committer | John Ehresman <jpe@src.gnome.org> | 2004-07-05 16:45:58 +0000 |
commit | 53d3853168fabddfe97fe6295ba34d7407a9139a (patch) | |
tree | 2ab325bb05aaf046d047534789173acab0a3b9ef /gobject/pygobject.c | |
parent | 15a51c629c459f5b69bd0f56a230f66bf7b631ec (diff) | |
download | pygobject-53d3853168fabddfe97fe6295ba34d7407a9139a.tar.gz pygobject-53d3853168fabddfe97fe6295ba34d7407a9139a.tar.xz pygobject-53d3853168fabddfe97fe6295ba34d7407a9139a.zip |
New conversion functions that use GParamSpec's declarations of new param
* pygtype.c (pyg_param_gvalue_from_pyobject,
pyg_param_gvalue_as_pyobject): New conversion functions that use
GParamSpec's
* pygobject.h, pygobject-private.h: declarations of new param
conversion functions
* pygobject.c (pygobject_get_property, pygobject_set_property):
Use param conversion functions
* gobjectmodule.c (pyg_parse_constructor_args): reorder local variable
declaration so it will compile with VC++
* tests/testconversion.py: tests for above
Diffstat (limited to 'gobject/pygobject.c')
-rw-r--r-- | gobject/pygobject.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gobject/pygobject.c b/gobject/pygobject.c index b6ea6f8..6c1a6f0 100644 --- a/gobject/pygobject.c +++ b/gobject/pygobject.c @@ -669,7 +669,7 @@ pygobject_get_property(PyGObject *self, PyObject *args) } g_value_init(&value, G_PARAM_SPEC_VALUE_TYPE(pspec)); g_object_get_property(self->obj, param_name, &value); - ret = pyg_value_as_pyobject(&value, TRUE); + ret = pyg_param_gvalue_as_pyobject(&value, TRUE, pspec); g_value_unset(&value); return ret; } @@ -698,7 +698,7 @@ pygobject_set_property(PyGObject *self, PyObject *args) return NULL; } g_value_init(&value, G_PARAM_SPEC_VALUE_TYPE(pspec)); - if (pyg_value_from_pyobject(&value, pvalue) < 0) { + if (pyg_param_gvalue_from_pyobject(&value, pvalue, pspec) < 0) { PyErr_SetString(PyExc_TypeError, "could not convert argument to correct param type"); return NULL; |