summaryrefslogtreecommitdiffstats
path: root/gobject/pygobject.c
Commit message (Collapse)AuthorAgeFilesLines
* METH_KEYWORDS w/o METH_VARARGS is invalid in python 3John Ehresman2010-04-151-1/+1
|
* Remove remaining PyInt & PyString callsJohn Ehresman2010-04-151-5/+5
|
* Fix reference leak when using repr in exception stringsJohn Ehresman2010-04-151-15/+36
|
* Use richcompare slot rather than old compare slot and Py_TYPE macro in ↵John Ehresman2010-04-151-6/+26
| | | | preparation for py3k support
* Don't raise an error in _pygi_import if pygi support is disabledSimon van der Linden2010-02-021-5/+1
| | | | http://bugzilla.gnome.org/show_bug.cgi?id=607674
* Add capabilities to import wrappers from pygiSimon van der Linden2009-11-091-0/+10
| | | | | | | | | | At instance creation for boxed and pointers, at lookup for objects, when the gtype has no wrapper yet, a wrapper may be imported from pygi. The feature is turned on at configure time by --enable-pygi. Because we couldn't create a circular build dependency, PyGI's import function and API definition had to be copied in this tree.
* Remove an empty structure, use sizeof(PyObject) insteadPaul Pogonyshev2009-04-211-2/+1
| | | | Solves bug 560591.
* Update the address of the FSF, by replacing old bits of the address withTobias Mueller2009-03-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2009-03-29 Tobias Mueller <tobiasmue@gnome.org> Update the address of the FSF, by replacing old bits of the address with new ones. Fixes bug 577134 * ltihooks.py: * pygtk.py: * COPYING: * gobject/pygparamspec.h: * gobject/pygpointer.c: * gobject/ffi-marshaller.h: * gobject/pygtype.c: * gobject/__init__.py: * gobject/pygpointer.h: * gobject/pygtype.h: * gobject/pygflags.c: * gobject/pyginterface.c: * gobject/pygflags.h: * gobject/pygboxed.c: * gobject/gobjectmodule.c: * gobject/pygenum.c: * gobject/pyginterface.h: * gobject/pygboxed.h: * gobject/pygobject.c: * gobject/constants.py.in: * gobject/pygenum.h: * gobject/propertyhelper.py: * gobject/pygparamspec.c: * gobject/ffi-marshaller.c: * glib/pygmainloop.c: * glib/pygoptioncontext.h: * glib/pygmainloop.h: * glib/pyglib-private.h: * glib/__init__.py: * glib/pygoptiongroup.c: * glib/pygspawn.c: * glib/pygmaincontext.c: * glib/pygoptiongroup.h: * glib/pygspawn.h: * glib/pygmaincontext.h: * glib/option.py: * glib/pygsource.c: * glib/glibmodule.c: * glib/pygiochannel.h: * glib/pygsource.h: * glib/pyglib.c: * glib/pyglib.h: * glib/pyglib-python-compat.h: * glib/pygoptioncontext.c: * gio/gfileinfo.override: * gio/gappinfo.override: * gio/__init__.py: * gio/gfileattribute.override: * gio/gvolume.override: * gio/gio.override: * gio/ginputstream.override: * gio/goutputstream.override: * gio/unix.override: * gio/gfile.override: * gio/gvolumemonitor.override: * gio/gapplaunchcontext.override: * gio/giomodule.c: * gio/gfileenumerator.override: * gio/pygio-utils.c: * gio/unixmodule.c: * gio/pygio-utils.h: * gio/gicon.override: svn path=/trunk/; revision=1038
* huge patch to fix memory leaks all over the place, fixes #568427Gian Mario Tagliaretti2009-02-081-3/+6
| | | | svn path=/trunk/; revision=1002
* Bug 530935 – pygobject_set_properties doesnt release the GILPaul Pogonyshev2008-09-091-20/+13
| | | | | | | | | | | | 2008-09-10 Paul Pogonyshev <pogonyshev@gmx.net> Bug 530935 – pygobject_set_properties doesnt release the GIL * gobject/pygobject.c (pygobject_set_properties): Reuse set_property_from_pspec() which release GIL for us. Also make sure that g_object_thaw_notify() is called even after error. svn path=/trunk/; revision=970
* * gobject/pygobject.c: Fix memory problems reported by valgrind due toGustavo J. A. M. Carneiro2008-08-301-1/+2
| | | | | | | | | * glib/pyglib.h: * gobject/pygobject.c: Fix memory problems reported by valgrind due to invalid tp_basicsize in PyGPropsDescr_Type. Closes #549945. svn path=/trunk/; revision=956
* Bug 547104 – improve type wrapper creationPaul Pogonyshev2008-08-111-9/+45
| | | | | | | | | | | | | | | | | | | | | | 2008-08-11 Paul Pogonyshev <pogonyshev@gmx.net> Bug 547104 – improve type wrapper creation * gobject/pygobject.c (pygobject_register_class): Use new pygobject_inherit_slots() to propagate custom slots in normal types too. (pygobject_inherit_slots): New function, break out of pygobject_new_with_interfaces() and rewrite a bit. (pygobject_find_slot_for): Add new argument that can forbid overriding non-NULL slots. * gio/gicon.override (pygio_do_icon_richcompare): Remove, the code is now directly in _wrap_g_icon_tp_richcompare(). (_wrap_g_file_icon_tp_richcompare, _wrap_g_file_icon_tp_hash) (_wrap_g_themed_icon_tp_richcompare, _wrap_g_themed_icon_tp_hash): Remove, duplicating code in this way is not needed anymore. svn path=/trunk/; revision=940
* Bug 547104 – improve runtime type wrapper creationPaul Pogonyshev2008-08-101-0/+63
| | | | | | | | | | | | | 2008-08-10 Paul Pogonyshev <pogonyshev@gmx.net> Bug 547104 – improve runtime type wrapper creation * gobject/pygobject.c (pygobject_new_with_interfaces): Use new pygobject_find_slot_for() for `tp_richcompare', `tp_compare`, `tp_hash', `tp_iter', `tp_repr', `tp_str' and `tp_print'. (pygobject_find_slot_for): New static function. svn path=/trunk/; revision=938
* Use the Py_TYPE macro everywhere.Johan Dahlin2008-07-271-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Use _PyLong macros.Johan Dahlin2008-07-271-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | 2008-07-27 Johan Dahlin <johan@gnome.org> * gobject/gobjectmodule.c (pyg_param_spec_from_object), (add_properties), (pyg_signal_new), (pyg_signal_list_ids), (pyg_signal_lookup), (pyg_signal_query): * gobject/pygenum.c (pyg_enum_richcompare), (pyg_enum_new), (pyg_enum_from_gtype), (pyg_enum_add), (pyg_enum_reduce), (pygobject_enum_register_types): * gobject/pygflags.c (pyg_flags_richcompare), (pyg_flags_new), (pyg_flags_from_gtype), (pyg_flags_add), (pyg_flags_and), (pyg_flags_or), (pyg_flags_xor), (pygobject_flags_register_types): * gobject/pygobject-private.h: * gobject/pygobject.c (pygobject_disconnect_by_func), (pygobject_handler_block_by_func), (pygobject_handler_unblock_by_func), (pygobject_get_refcount): * gobject/pygparamspec.c (pyg_param_spec_getattr): * gobject/pygtype.c (_wrap_g_type_wrapper__get_depth), (pyg_type_from_object), (pyg_enum_get_value), (pyg_flags_get_value), (pyg_value_from_pyobject), (pyg_value_as_pyobject): Use _PyLong macros. svn path=/trunk/; revision=884
* Use PYGLIB_DEFINE_TYPE macro and move struct field initialization to theJohan Dahlin2008-07-271-217/+65
| | | | | | | | | | | | | | | | | 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
* Add _PyUnicode_Type macroJohan Dahlin2008-07-271-19/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Move off a bit more to separate functions, cleaning up the init_glib a bitJohan Dahlin2008-07-261-0/+71
| | | | | | | | | | | | | | | | | | | | | 2008-07-27 Johan Dahlin <johan@gnome.org> * gobject/Makefile.am: * gobject/gobjectmodule.c (pygobject_register_api), (pygobject_register_constants), (pygobject_register_features), (pygobject_register_version_tuples), (pygobject_register_warnings), (init_gobject): * gobject/pygobject-private.h: * gobject/pygobject.c (pyobject_copy), (pyobject_free), (pygobject_object_register_types): * gobject/pygtype.c (_pyg_strv_from_gvalue), (_pyg_strv_to_gvalue), (pygobject_type_register_types): * gobject/pygtype.h: Move off a bit more to separate functions, cleaning up the init_glib a bit more. svn path=/trunk/; revision=879
* Move paramspec registration to a separate file, add a header for theJohan Dahlin2008-07-261-0/+6
| | | | | | | | | | | | | | | | | 2008-07-27 Johan Dahlin <johan@gnome.org> * gobject/Makefile.am: * gobject/gobjectmodule.c (init_gobject): * gobject/pygobject-private.h: * gobject/pygobject.c: * gobject/pygparamspec.c (pygobject_paramspec_register_types): * gobject/pygparamspec.h: * gobject/pygtype.c: Move paramspec registration to a separate file, add a header for the internal API. svn path=/trunk/; revision=878
* reviewed by: <delete if not using a buddy>Johan Dahlin2008-07-261-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | 2008-07-26 Johan Dahlin <johan@gnome.org> reviewed by: <delete if not using a buddy> * glib/pyglib-python-compat.h: * glib/pyglib.h: Make a few macros public * gobject/Makefile.am: * gobject/gobjectmodule.c (init_gobject): * gobject/pyginterface.c (pyg_interface_init), (pyg_interface_free), (pyg_register_interface), (pyg_register_interface_info), (pyg_lookup_interface_info), (pygobject_interface_register_types): * gobject/pyginterface.h: * gobject/pygobject-private.h: * gobject/pygobject.c: Move GInterface wrapper into its own file svn path=/trunk/; revision=875
* Move maincontext and mainloop over to glib. Update the threadstate api toJohan Dahlin2008-07-201-10/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* New functions, unconditionally raise TypeError. (pygobject_methods): HookPaul Pogonyshev2008-06-091-0/+20
| | | | | | | | | | 2008-06-09 Paul Pogonyshev <pogonyshev@gmx.net> * gobject/pygobject.c (pygobject_copy, pygobject_deepcopy): New functions, unconditionally raise TypeError. (pygobject_methods): Hook them up. (bug #482370) svn path=/trunk/; revision=787
* Bug 466082 – pygobject_new_full not fully initialising PyGObject, chaos ↵Gustavo J. A. M. Carneiro2007-08-141-2/+6
| | | | | | results svn path=/trunk/; revision=694
* revert last change (g_object_run_dispose)Gustavo J. A. M. Carneiro2007-07-071-11/+0
| | | | svn path=/trunk/; revision=684
* Bug 398696 – Wrap g_object_run_disposeGustavo J. A. M. Carneiro2007-07-071-0/+11
| | | | svn path=/trunk/; revision=683
* Rename the private struct field to private_flags, because private is a C++Murray Cumming2007-07-041-2/+2
| | | | | | | | | | | 2007-07-04 Murray Cumming <murrayc@murrayc.com> * gobject/pygobject.c: (pygobject_switch_to_toggle_ref): * gobject/pygobject.h: Rename the private struct field to private_flags, because private is a C++ keyword, so this broke builds of some C++ applications, such as Glom. svn path=/trunk/; revision=679
* Bug 447271 – gobject has a weird bug on mac. Involves python, property and ↵Gustavo J. A. M. Carneiro2007-06-171-0/+4
| | | | | | subclassing svn path=/trunk/; revision=677
* fix descriptor / toggle_ref interaction bugGustavo J. A. M. Carneiro2007-04-301-3/+4
| | | | svn path=/trunk/; revision=658
* new pygobject_set_properties and pygobject_get_properties methodsGian Mario Tagliaretti2007-04-231-0/+107
| | | | svn path=/trunk/; revision=646
* Bug 320428 – Break PyGObject<->GObject reference cycleGustavo J. A. M. Carneiro2007-04-141-98/+374
| | | | svn path=/trunk/; revision=642
* Fix a couple of compiler warnings.Gustavo J. A. M. Carneiro2007-03-171-2/+2
| | | | svn path=/trunk/; revision=640
* Release the GIL when calling g_object_set_property, since setting aEdward Hervey2007-03-031-0/+3
| | | | | | | | | * gobject/pygobject.c: (set_property_from_pspec): Release the GIL when calling g_object_set_property, since setting a property might trigger some code that might come back in python land. Fixes #395048 svn path=/trunk/; revision=638
* set __module__ on gobject derived types, fixes #376099Johan Dahlin2006-11-181-2/+12
| | | | | * gobject/pygobject.c (pygobject_register_class): set __module__ on gobject derived types, fixes #376099
* Revert accidentally commited changesJohan Dahlin2006-11-181-1/+1
|
* Add a test for #375589Johan Dahlin2006-11-181-1/+1
|
* Python 2.5, int vs ssize_tGustavo J. A. M. Carneiro2006-10-031-30/+39
|
* Add infrastructure for lazy type registration, fixes #Johan Dahlin2006-07-131-2/+9
| | | | | | | | | | | | | * gobject/gobjectmodule.c: (pyg_type_from_name), (get_type_name_for_class): * gobject/pygobject-private.h: * gobject/pygobject.c: (pygobject_new_with_interfaces), (pygobject_lookup_class), (pygobject_emit): * gobject/pygobject.h: * gobject/pygtype.c: (_wrap_g_type_from_name), (pyg_type_from_object), (pyg_type_register_custom_callback), (pyg_type_get_custom), (_pyg_type_from_name): Add infrastructure for lazy type registration, fixes #
* gobject.new fix for 'subsubtype' caseGustavo J. A. M. Carneiro2006-05-281-4/+10
|
* Bug 341174 – Be more specific in set/get_property error messagesGustavo J. A. M. Carneiro2006-05-201-5/+7
|
* Fix #154845, add tests and a private method.Johan Dahlin2006-04-291-0/+99
| | | | | | | | | | | | * gobject/pygtype.c (gclosure_from_pyfunc): * gobject/pygobject.c (pygobject_disconnect_by_func) (pygobject_handler_block_by_func) (pygobject_handler_unblock_by_func): * tests/test_signal.py (TestEmissionHook._callback): Fix #154845, add tests and a private method.
* Move GObjectMeta from C to python-landGustavo J. A. M. Carneiro2006-04-111-89/+3
|
* update a commentGustavo J. A. M. Carneiro2006-03-191-2/+1
|
* pygobject_register_class api compat. fixGustavo J. A. M. Carneiro2006-01-131-7/+33
|
* ignore interfaces from .defs, discover them at runtimeGustavo J. A. M. Carneiro2006-01-131-40/+60
|
* We always need to free interfaces since its a null terminated array.Johan Dahlin2005-11-151-1/+1
| | | | | * gobject/pygobject.c (pygobject_new_with_interfaces): We always need to free interfaces since its a null terminated array.
* plug leak; add glade test; fix warning messageGustavo J. A. M. Carneiro2005-11-091-2/+2
|
* Fix gcc 4.0 warnings.PYGTK_2_8_1Johan Dahlin2005-10-031-2/+2
| | | | | | | | | * gobject/pygobject.c: (PyGProps_length): * gtk/gdk.defs: * gtk/gdk.override: * gtk/gtk.defs: * gtk/gtk.override: Fix gcc 4.0 warnings.
* Check if the gobject is initialized, partly fixes #96658Johan Dahlin2005-10-031-1/+59
| | | | | | | | | | | | | * gobject/pygobject.c: (pygobject_get_property), (pygobject_set_property), (pygobject_freeze_notify), (pygobject_notify), (pygobject_thaw_notify), (pygobject_get_data), (pygobject_set_data), (pygobject_connect), (pygobject_connect_after), (pygobject_connect_object), (pygobject_connect_object_after), (pygobject_disconnect), (pygobject_handler_is_connected), (pygobject_handler_block), (pygobject_emit), (pygobject_stop_emission), (pygobject_chain_from_overridden): Check if the gobject is initialized, partly fixes #96658
* Include the object and the name of the signal in TypeErrorsJohan Dahlin2005-09-221-6/+18
| | | | | | | | | * gobject/gobjectmodule.c: (pyg_type_from_name): * gobject/pygobject.c: (pygobject_connect), (pygobject_connect_after), (pygobject_connect_object), (pygobject_connect_object_after), (pygobject_emit), (pygobject_stop_emission): Include the object and the name of the signal in TypeErrors
* Remove unneeded g_strdup.PYGTK_2_8_0John Ehresman2005-08-291-3/+2
| | | | | * gobject/pygobject.c (pygobjectmeta_register): Remove unneeded g_strdup.