diff options
| author | Johan Dahlin <johan@gnome.org> | 2008-07-20 14:17:04 +0000 |
|---|---|---|
| committer | Johan Dahlin <johan@src.gnome.org> | 2008-07-20 14:17:04 +0000 |
| commit | 45ccf5f6ff1a1805ed326b397c70cf55bba28124 (patch) | |
| tree | 59b30668a1b28efced9f417b1e6bc2f4bc9709ec /gobject/pygobject.h | |
| parent | 9cd866c9066eaa933b54e77225ada672fcfacad3 (diff) | |
| download | pygobject-45ccf5f6ff1a1805ed326b397c70cf55bba28124.tar.gz pygobject-45ccf5f6ff1a1805ed326b397c70cf55bba28124.tar.xz pygobject-45ccf5f6ff1a1805ed326b397c70cf55bba28124.zip | |
Move maincontext and mainloop over to glib. Update the threadstate api to
2008-07-20 Johan Dahlin <johan@gnome.org>
* glib/Makefile.am:
* glib/glibmodule.c (pyglib_main_context_default), (init_glib):
* glib/pyglib.c (pyglib_init), (pyglib_threads_enabled),
(pyglib_main_context_new):
* glib/pyglib.h:
* glib/pygmaincontext.c (_wrap_g_main_context_iteration),
(pyglib_maincontext_register_types):
* glib/pygmaincontext.h:
* glib/pygmainloop.c (pyg_signal_watch_prepare),
(pyg_signal_watch_check), (pyg_main_loop_new),
(_wrap_g_main_loop_get_context), (_wrap_g_main_loop_run),
(pyglib_mainloop_register_types):
* glib/pygmainloop.h:
* gobject/Makefile.am:
* gobject/__init__.py:
* gobject/gobjectmodule.c (pyg_destroy_notify), (pyobject_free),
(pyg_object_set_property), (pyg_object_get_property),
(_pyg_signal_accumulator), (pygobject__g_instance_init),
(pyg_handler_marshal), (pygobject_gil_state_ensure),
(pygobject_gil_state_release), (marshal_emission_hook),
(_log_func), (init_gobject):
* gobject/pygboxed.c (pyg_boxed_dealloc), (pyg_boxed_new):
* gobject/pygenum.c (pyg_enum_add):
* gobject/pygflags.c (pyg_flags_add):
* gobject/pygiochannel.c (pyg_iowatch_marshal):
* gobject/pygmaincontext.c:
* gobject/pygmainloop.c:
* gobject/pygobject-private.h:
* gobject/pygobject.c (pygobject_data_free), (pyg_toggle_notify),
(pygobject_new_with_interfaces), (pygobject_weak_ref_notify):
* gobject/pygobject.h:
* gobject/pygoptiongroup.c (destroy_g_group), (arg_func):
* gobject/pygpointer.c (pyg_pointer_new):
* gobject/pygsource.c (pyg_source_get_context),
(pyg_source_prepare), (pyg_source_check), (pyg_source_dispatch),
(pyg_source_finalize):
* gobject/pygtype.c (pyg_closure_invalidate),
(pyg_closure_marshal), (pyg_signal_class_closure_marshal):
* tests/common.py:
Move maincontext and mainloop over to glib.
Update the threadstate api to use the variant in glib.
svn path=/trunk/; revision=843
Diffstat (limited to 'gobject/pygobject.h')
| -rw-r--r-- | gobject/pygobject.h | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/gobject/pygobject.h b/gobject/pygobject.h index 76ab437..592853a 100644 --- a/gobject/pygobject.h +++ b/gobject/pygobject.h @@ -176,7 +176,6 @@ struct _PyGObject_Functions { gboolean threads_enabled; int (*enable_threads) (void); - /* These 2 are deprecated */ int (*gil_state_ensure) (void); void (*gil_state_release) (int flag); @@ -254,6 +253,8 @@ struct _PyGObject_Functions *_PyGObject_API; #define pyg_flags_add (_PyGObject_API->flags_add) #define pyg_flags_from_gtype (_PyGObject_API->flags_from_gtype) #define pyg_enable_threads (_PyGObject_API->enable_threads) +#define pyg_gil_state_ensure (_PyGObject_API->gil_state_ensure) +#define pyg_gil_state_release (_PyGObject_API->gil_state_release) #define pyg_register_class_init (_PyGObject_API->register_class_init) #define pyg_register_interface_info (_PyGObject_API->register_interface_info) #define pygobject_construct (_PyGObject_API->pygobject_construct) @@ -265,7 +266,6 @@ struct _PyGObject_Functions *_PyGObject_API; #define pyg_gerror_exception_check (_PyGObject_API->gerror_exception_check) #define pyg_option_group_new (_PyGObject_API->option_group_new) - #define pyg_block_threads() G_STMT_START { \ if (_PyGObject_API->block_threads != NULL) \ (* _PyGObject_API->block_threads)(); \ @@ -277,14 +277,6 @@ struct _PyGObject_Functions *_PyGObject_API; #define pyg_threads_enabled (_PyGObject_API->threads_enabled) -#define pyg_gil_state_ensure() \ - (_PyGObject_API->threads_enabled ? \ - (PyGILState_Ensure()) : 0) -#define pyg_gil_state_release(state) G_STMT_START { \ - if (_PyGObject_API->threads_enabled) \ - PyGILState_Release(state); \ - } G_STMT_END - #define pyg_begin_allow_threads \ G_STMT_START { \ PyThreadState *_save = NULL; \ |
