| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
2008-07-27 Johan Dahlin <johan@gnome.org>
* glib/pyglib-python-compat.h:
* gobject/gobjectmodule.c (pyg_object_new),
(pyg__install_metaclass):
* gobject/pygboxed.c (pyg_boxed_dealloc), (pyg_boxed_init),
(pyg_register_boxed):
* gobject/pygenum.c (pyg_enum_reduce):
* gobject/pyginterface.c (pyg_interface_init),
(pyg_register_interface):
* gobject/pygobject.c (pygobject_get_inst_data),
(pygobject_register_class), (pygobject_new_with_interfaces),
(pygobject_dealloc), (pygobject_repr), (pygobject_emit),
(pygobject_chain_from_overridden), (pygobject_weak_ref_notify):
* gobject/pygparamspec.c (pygobject_paramspec_register_types):
* gobject/pygpointer.c (pyg_pointer_dealloc), (pyg_pointer_init),
(pyg_register_pointer):
* gobject/pygtype.c (pyg_type_from_object),
(pyg_value_array_from_pyobject), (pyg_value_from_pyobject),
(pyg_object_descr_doc_get):
Use the Py_TYPE macro everywhere.
svn path=/trunk/; revision=886
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
2008-07-27 Johan Dahlin <johan@gnome.org>
* gobject/pygboxed.c (pygobject_boxed_register_types):
* gobject/pygenum.c (pygobject_enum_register_types):
* gobject/pygflags.c (pygobject_flags_register_types):
* gobject/pygobject.c (pygobject_object_register_types):
* gobject/pygparamspec.c (pygobject_paramspec_register_types):
* gobject/pygpointer.c (pygobject_pointer_register_types):
* gobject/pygtype.c (pygobject_type_register_types):
Use PYGLIB_DEFINE_TYPE macro and move struct field initialization
to the registration methods.
svn path=/trunk/; revision=883
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
2008-07-27 Johan Dahlin <johan@gnome.org>
* glib/pyglib-python-compat.h:
Add _PyUnicode_Type macro
* gobject/gobjectmodule.c (pyg_type_name), (pyg_type_from_name),
(_pyg_signal_accumulator), (add_signals), (add_properties),
(get_type_name_for_class), (pyg_signal_list_names),
(pyg_signal_name), (pyg_signal_query), (pyg_object_new),
(pyg_add_emission_hook), (pyg_remove_emission_hook):
* gobject/pygboxed.c (pyg_boxed_repr):
* gobject/pygenum.c (pyg_enum_repr), (pyg_enum_add),
(pyg_enum_get_value_name), (pyg_enum_get_value_nick):
* gobject/pygflags.c (pyg_flags_repr), (pyg_flags_add),
(pyg_flags_get_first_value_name), (pyg_flags_get_first_value_nick),
(pyg_flags_get_value_names), (pyg_flags_get_value_nicks):
* gobject/pygobject.c (build_parameter_list), (PyGProps_getattro),
(PyGProps_setattro), (pygobject_register_class), (pygobject_repr),
(pygobject_init), (pygobject_get_properties),
(pygobject_set_properties), (pygobject_connect),
(pygobject_connect_after), (pygobject_connect_object),
(pygobject_connect_object_after), (pygobject_emit),
(pygobject_stop_emission), (pygobject_disconnect_by_func),
(pygobject_handler_block_by_func),
(pygobject_handler_unblock_by_func),
(pygobject_object_register_types):
* gobject/pygparamspec.c (pyg_param_spec_repr),
(pyg_param_spec_getattr):
* gobject/pygpointer.c (pyg_pointer_repr):
* gobject/pygtype.c (pyg_type_wrapper_repr),
(_wrap_g_type_wrapper__get_name), (pyg_type_from_object),
(pyg_enum_get_value), (pyg_flags_get_value),
(pyg_value_from_pyobject), (pyg_value_as_pyobject),
(object_doc_descr_get), (_pyg_strv_from_gvalue),
(_pyg_strv_to_gvalue):
Use _PyUnicode_* macros in the gobject module
svn path=/trunk/; revision=882
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
2008-07-27 Johan Dahlin <johan@gnome.org>
* gobject/Makefile.am:
* gobject/gobjectmodule.c (init_gobject):
* gobject/pygboxed.c (pygobject_boxed_register_types):
* gobject/pygboxed.h:
* gobject/pygenum.c (pygobject_enum_register_types):
* gobject/pygenum.h:
* gobject/pygflags.c (pygobject_flags_register_types):
* gobject/pygflags.h:
* gobject/pygpointer.c (pygobject_pointer_register_types):
* gobject/pygpointer.h:
Split out quark and type registration to the respective
implementation source files, add headers.
svn path=/trunk/; revision=880
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* gtk/pygtktreemodel.c: Clean up most functions here to have only
one return path.
* gobject/pygobject.c (pygobject_emit): Protect g_value_unset by
UNBLOCK/BLOCK_THREADS since it might call pygobject_free which
will result in a deadlock.
* gobject/gobjectmodule.c (pyg_thread_init): New function, move
thread initalization stuff in here.
* All over the place: Kill pyg_block/unblock_threads and use
PyGILState and Py_BEGIN/END_ALLOW_THREADS.
unblock [code] block calls are replaced by Py_BEGIN/END and
block [code] unblock calls are replaced by PyGILState.
|
|
|
|
|
|
|
|
|
|
|
| |
* gobject/Makefile.am:
* setup.py:
* makefile.msc: Update, why do I even bother to update 3 different
build systems?
* gobject/: Split out GParamSpec, GMainLoop, GMainContext and
GPointer to separate files. Also remove *.h files and go back to
the old scheme (everything in pygobject.h)
|
| |
|
|
|
|
|
|
| |
2003-06-26 James Henstridge <james@daa.com.au>
* (lots of stuff): add copyright notices, and update to LGPL 2.1.
|
|
|
|
|
|
|
|
|
|
| |
2003-03-13 James Henstridge <james@daa.com.au>
* gobjectmodule.c: add doc comments.
* pygobject.c: add doc comments.
* pygboxed.c: add doc comments.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
2003-03-04 Jon Trowbridge <trow@ximian.com>
* pygobject.c (pygobject_dealloc): Unblock threads before
invalidating our closures, since this might trigger a destructor
that needs to execute python code.
(pygobject_clear): Ditto.
* pygboxed.c (pyg_boxed_dealloc): Unblock threads before freeing
the boxed type, since the destructor may need to execute python
code.
(pyg_boxed_new): Block threads while we make our Py* calls.
(pyg_pointer_new): Block threads while we make our Py* calls.
* gobjectmodule.c (pyg_object_set_property): We need to block
threads before our call to pygobject_new.
(pyg_object_get_property): Ditto.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
2002-07-12 James Henstridge <james@daa.com.au>
These changes help with win32 compat.
* pygboxed.c (PyGBoxed_Type): set tp_alloc and tp_new to NULL.
(PyGPointer_Type): same here.
* gobjectmodule.c (PyGInterface_Type): set tp_alloc and tp_new to
NULL.
(initgobject): set tp_new and tp_alloc for various types.
* pygobject.c (PyGObject_Type): set tp_alloc and tp_new to NULL.
|
|
|
|
|
|
|
|
|
| |
Sun Jun 23 11:10:30 2002 Jonathan Blandford <jrb@gnome.org>
* pygboxed.c: Add GBoxed::copy
* pygobject.c (pygobject_init): take kwargs so we can pass
construct-only arguments to our initialization function.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
2002-02-05 James Henstridge <james@daa.com.au>
* codegen/codegen.py (register_types): register pointer types as
well.
* codegen/argtypes.py (PointerArg): handling for pointer arg
types.
(ArgMatcher.register_pointer): add function to register pointer
types.
* gtk/gtk.override (_wrap_gtk_ctree__get_selection): GtkCTreeNode
is not a boxed type.
(_wrap_gtk_ctree_base_nodes): same.
(_wrap_gtk_ctree_insert_node): same.
(_wrap_gtk_ctree_find_by_row_data): same.
(_wrap_gtk_ctree_find_all_by_row_data): same.
(_wrap_gtk_ctree_node_get_text): same.
(_wrap_gtk_ctree_node_get_pixmap): same.
(_wrap_gtk_ctree_node_get_pixtext): same.
(_wrap_gtk_ctree_get_node_info): same.
(_wrap_gtk_ctree_node_set_row_data): same.
(_wrap_gtk_ctree_node_get_row_data): same here.
(_wrap_gtk_ctree_getattr): same here.
* codegen/codegen.py (write_source): register pointer types as
pointers.
* pango.override (_wrap_pango_font_description_new): ignore some
private (well, pango module API) functions.
* gtk/gtk-types.defs (CTreeNode): make this a pointer type.
* codegen/codegen.py (write_pointer_method): new method to write
methods for GPointer types.
(write_pointer_constructor): new function for writing constructor
for GPointer types.
(write_pointer_getsets): new function for writing getters for
pointer objects (this should be merged with the GObject and GBoxed
versions ...).
(write_pointer): add new function, which calls all the GPointer
related functions.
(write_source): write pointer types.
* gobjectmodule.c (initgobject): actually ready the GPointer type.
* gtk/gtk-types.defs (CTreeNode): get rid of fields here. They
will be covered by the custom getattr() function, so no need to
duplicate.
* codegen/codegen.py (write_boxed_getsets): convert to use getsets
for boxed objects.
(write_boxed): use write_boxed_getsets() to write the getsets,
while allowing boxed objects to specify a getattr() function.
2002-02-04 James Henstridge <james@daa.com.au>
* gobjectmodule.c (initgobject): add GPointer to the module dict.
(pygobject_api_functions): and to the API vtable.
* pygobject.h (pyg_constant_strip_prefix): and add it to the
public header.
* pygobject-private.h (pyg_pointer_new): add stuff to private
header ...
* pygboxed.c (PyGPointer): add code to handle base GPointer type.
* codegen/defsparser.py (DefsParser.__init__): add self.pointers
attribute.
(DefsParser.define_pointer): handle (define-pointer ...).
(DefsParser.write_defs): handle pointer types.
* codegen/definitions.py (PointerDef): new definition type for
G_TYPE_POINTER subclasses.
|
|
2002-01-21 James Henstridge <james@daa.com.au>
* Makefile.am (gobjectmodule_la_SOURCES): list extra source files.
* pygobject-private.h (pyg_boxed_new): new header for functions
shared between files in gobjectmodule.
* pygboxed.c (pyg_register_boxed): move GBoxed handling code here.
|