diff options
| author | Benjamin Otte <in7y118@public.uni-hamburg.de> | 2005-05-17 17:47:10 +0000 |
|---|---|---|
| committer | Johan Dahlin <zilch@src.gnome.org> | 2005-05-17 17:47:10 +0000 |
| commit | 02f815401f09b07bccfce01d3a5abb19b3a34095 (patch) | |
| tree | 891f8b8243d11a93f915a9efb5a05b06b967f992 /gobject/pygobject.h | |
| parent | 2abe91752472e501266330b7ca21976046e1973e (diff) | |
| download | pygobject-02f815401f09b07bccfce01d3a5abb19b3a34095.tar.gz pygobject-02f815401f09b07bccfce01d3a5abb19b3a34095.tar.xz pygobject-02f815401f09b07bccfce01d3a5abb19b3a34095.zip | |
reviewed by: Johan Dahlin <jdahlin@async.com.br>
2005-05-17 Benjamin Otte <in7y118@public.uni-hamburg.de>
reviewed by: Johan Dahlin <jdahlin@async.com.br>
* gobject/gobjectmodule.c:
* gobject/pygobject-private.h:
* gobject/pygobject.h:
* gobject/pygtype.c: (pyg_closure_marshal),
(pyg_closure_set_exception_handler): Adds exception handling
support to closures, fixes #304357
Diffstat (limited to 'gobject/pygobject.h')
| -rw-r--r-- | gobject/pygobject.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gobject/pygobject.h b/gobject/pygobject.h index 22e488c..b0c387e 100644 --- a/gobject/pygobject.h +++ b/gobject/pygobject.h @@ -17,12 +17,14 @@ G_BEGIN_DECLS #endif /* PyGClosure is a _private_ structure */ +typedef void (* PyClosureExceptionHandler) (GValue *ret, guint n_param_values, const GValue *params); typedef struct _PyGClosure PyGClosure; struct _PyGClosure { GClosure closure; PyObject *callback; PyObject *extra_args; /* tuple of extra args to pass to callback */ PyObject *swap_data; /* other object for gtk_signal_connect_object */ + PyClosureExceptionHandler exception_handler; }; typedef struct { @@ -160,6 +162,7 @@ struct _PyGObject_Functions { void (*gil_state_release) (int flag); void (*register_class_init) (GType gtype, PyGClassInitFunc class_init); void (*register_interface_info) (GType gtype, const GInterfaceInfo *info); + void (*closure_set_exception_handler) (GClosure *closure, PyClosureExceptionHandler handler); }; #ifndef _INSIDE_PYGOBJECT_ @@ -177,6 +180,7 @@ struct _PyGObject_Functions *_PyGObject_API; #define pygobject_new (_PyGObject_API->newgobj) #define pyg_closure_new (_PyGObject_API->closure_new) #define pygobject_watch_closure (_PyGObject_API->object_watch_closure) +#define pyg_closure_set_exception_handler (_PyGObject_API->closure_set_exception_handler) #define pyg_destroy_notify (_PyGObject_API->destroy_notify) #define pyg_type_from_object (_PyGObject_API->type_from_object) #define pyg_type_wrapper_new (_PyGObject_API->type_wrapper_new) |
