summaryrefslogtreecommitdiffstats
path: root/gobject
Commit message (Collapse)AuthorAgeFilesLines
* Remove remaining PyInt & PyString callsJohn Ehresman2010-04-152-8/+8
|
* Make pyglib-python-compat.h a public header and include in pygobject.h Also ↵John Ehresman2010-04-151-0/+2
| | | | #define PyVarObject_HEAD_INIT if not defined (in < python 2.6)
* Fix reference leak when using repr in exception stringsJohn Ehresman2010-04-152-21/+50
|
* Use richcompare slot rather than old compare slot and Py_TYPE macro in ↵John Ehresman2010-04-155-28/+82
| | | | preparation for py3k support
* Don't raise an error in _pygi_import if pygi support is disabledSimon van der Linden2010-02-024-16/+3
| | | | http://bugzilla.gnome.org/show_bug.cgi?id=607674
* Register enums and flags in PyGI if neededTomeu Vizoso2009-12-292-12/+27
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=603534
* Fix handling of uchar in pyg_value_from_pyobjectBastian Winkler2009-12-251-4/+11
| | | | | Set the value by g_value_set_uchar and allow to use integer types from python.
* Add pygi-external.h into Makefile SOURCESGian Mario Tagliaretti2009-12-181-1/+2
|
* Suppress warnings about format conversionSimon van der Linden2009-11-301-16/+16
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=603355
* Add the missing limit constants from glibconfig.hTomeu Vizoso2009-11-281-1/+16
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=603244
* Fix wrong minimum checking in float propertiesPaul Pogonyshev2009-11-221-2/+3
| | | | Bug #587637. Test the fix.
* Create instances by calling tp_alloc rather than PyObject_NEWSimon van der Linden2009-11-091-1/+2
| | | | | | PyObject_NEW calls a generic allocator and should only be called by tp_new, knowing that the type's free function agrees. In pyg_boxed_new, we may allocate PyGBoxed subtypes, so the subtype's allocation function must be called instead.
* Add capabilities to import wrappers from pygiSimon van der Linden2009-11-094-0/+97
| | | | | | | | | | 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.
* Make GType.pytype aware of the interface, enum, flags, pointer and boxed ↵Simon van der Linden2009-11-071-6/+33
| | | | wrappers
* Add macros to help with Python list to/from GList/GSList conversions.John Finlay2009-08-111-1/+241
|
* Add Python version into installed libpyglib nameEmilio Pozuelo Monfort2009-05-241-1/+1
| | | | | Do this now, while no-one (as far as we know) links to the library besides PyGObject itself. Bug #550235.
* Fix occasional build failures after the 'ltihooks.py' removalPaul Pogonyshev2009-04-291-1/+1
| | | | | Simply amend all related symbolic link creation so that any errors are ignored.
* Fix a crash in pyg_type_add_interfaces()Paul Pogonyshev2009-04-271-4/+8
| | | | Reported as part of bug #566571.
* Remove an empty structure, use sizeof(PyObject) insteadPaul Pogonyshev2009-04-211-2/+1
| | | | Solves bug 560591.
* Remove 'ltihooks.py' as using deprecated Python module.Paul Pogonyshev2009-04-182-7/+7
| | | | | | | Remove the script and all related imports. All relevant Makefile's now create symbolic links for '.so' files from '.libs' to the level up, so that C helper modules are still importable in built, but not installed source tree.
* Code maintenance: add .gitignore filesPaul Pogonyshev2009-04-181-0/+3
|
* 2009-04-17 Paul Pogonyshev <pogonyshev@gmx.net>Paul Pogonyshev2009-04-171-0/+10
| | | | | | | Bug 568499 – CellRendererPixbuf stock-size property has wrong type * gobject/pygtype.c (pyg_enum_get_value): Also accept long integers.
* Bug 577999 – converting a negative long Python value to a GUINT64 GValue ↵Gustavo J. A. M. Carneiro2009-04-051-38/+16
| | | | | | doesn't error out as it should svn path=/trunk/; revision=1054
* Update the address of the FSF, by replacing old bits of the address withTobias Mueller2009-03-2921-21/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Bug 559001 – Allow setting pytype wrapper classmarklee2009-03-221-1/+21
| | | | | | | | | | | | initial patch by: John Ehresman <jpe@wingware.com> * gobject/pygtype.c (_wrap_g_type_wrapper__set_pytype): New function. * tests/test_gtype.py (GTypeTest.assertPyType), (GTypeTest.setInvalidPyType), (GTypeTest.testPyType), (GTypeTest.testInvalidPyType): Two new testcases to test the above, with accompanying helper methods. svn path=/trunk/; revision=1030
* Change comment to avoid false positives when grep'ing for deprecated gtkAndre Klapper2009-02-181-1/+1
| | | | | | | | | | | 2009-02-18 Andre Klapper <a9016009@gmx.de> * gobject/pygobject.h: Change comment to avoid false positives when grep'ing for deprecated gtk functions svn path=/trunk/; revision=1011
* huge patch to fix memory leaks all over the place, fixes #568427Gian Mario Tagliaretti2009-02-083-5/+10
| | | | svn path=/trunk/; revision=1002
* Bug 566571 – gtk.Buildable interface method override is not recognizedPaul Pogonyshev2009-01-141-100/+77
| | | | | | | | | | | | | | | | 2009-01-14 Paul Pogonyshev <pogonyshev@gmx.net> Bug 566571 – gtk.Buildable interface method override is not recognized * gobject/gobjectmodule.c (pyg_type_add_interfaces): New function, break out code repetition out of pyg_type_register(). * tests/test_subtype.py (TestSubType.test_gtk_buildable_virtual_method): New test case (inactive). svn path=/trunk/; revision=997
* Add a comment explaining why the two for loops for registering interfaces.Gustavo J. A. M. Carneiro2009-01-091-0/+29
| | | | | | | | * gobject/gobjectmodule.c (pyg_type_register): Add a comment explaining why the two for loops for registering interfaces. svn path=/trunk/; revision=995
* Bad -I ordering can break build fixes #566737Gian Mario Tagliaretti2009-01-061-2/+2
| | | | svn path=/trunk/; revision=993
* Bug 563714 – GNOME Goal: Clean up GLib and GTK+ includesPrzemysław Grzegorczyk2009-01-041-1/+1
| | | | | | | | | | | 2009-01-04 Przemysław Grzegorczyk <pgrzegorczyk@gmail.com> Bug 563714 – GNOME Goal: Clean up GLib and GTK+ includes * gobject/generate-constants.c: * glib/pygspawn.c: Only include toplevel <glib.h>. svn path=/trunk/; revision=989
* 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
* Fix typo (s/&type/type) introduced in r886 causing weird crashes onLoïc Minier2008-09-021-1/+1
| | | | | | | | | | 2008-09-03 Loïc Minier <lool@dooz.org> * gobject/pygpointer.c: (pyg_register_pointer): Fix typo (s/&type/type) introduced in r886 causing weird crashes on x86-64; bug #550463. svn path=/trunk/; revision=961
* * 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
* Mark pyglib_notify_on_enabling_threads() as private (also rename).Paul Pogonyshev2008-08-271-1/+1
| | | | svn path=/trunk/; revision=955
* Bug 549191 – Constructor of gtk.TreeView raises TypeError when model isPaul Pogonyshev2008-08-271-7/+11
| | | | | | | | | | | | 2008-08-28 Paul Pogonyshev <pogonyshev@gmx.net> Bug 549191 – Constructor of gtk.TreeView raises TypeError when model is None * gobject/pygtype.c (pyg_value_from_pyobject): Handle None in G_TYPE_INTERFACE branch. svn path=/trunk/; revision=954
* Bug 547633 – cannot create new threads when pygtk is usedPaul Pogonyshev2008-08-271-0/+9
| | | | | | | | | | | | | | | | | | 2008-08-28 Paul Pogonyshev <pogonyshev@gmx.net> Bug 547633 – cannot create new threads when pygtk is used * glib/pyglib.c (pyglib_notify_on_enabling_threads): New function. (pyglib_enable_threads): Invoke all callbacks added with new pyglib_notify_on_enabling_threads(). * gobject/gobjectmodule.c (pyg_note_threads_enabled): New function (callback for new pyglib_notify_on_enabling_threads()). (PYGLIB_MODULE_START): Initialize 'pygobject_api_functions.threads_enabled' and also watch for thread being enabled later on. svn path=/trunk/; revision=952
* Bug 540376 – No TypeError raised when type is NonePaul Pogonyshev2008-08-111-0/+8
| | | | | | | | | | | | | 2008-08-11 Paul Pogonyshev <pogonyshev@gmx.net> Bug 540376 – No TypeError raised when type is None * gobject/gobjectmodule.c (pyg_signal_new): Add check on second argument type. * tests/test_signal.py (TestSignalCreation): New test case. svn path=/trunk/; revision=942
* 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
* Add a pygobject_enable_threads wrapper around pyglib_threads_enable andJohan Dahlin2008-08-061-2/+11
| | | | | | | | | | | | | 2008-08-06 Johan Dahlin <johan@gnome.org> * glib/pyglib.c (pyglib_enable_threads): * gobject/gobjectmodule.c (pyg_threads_init), (pygobject_enable_threads): Add a pygobject_enable_threads wrapper around pyglib_threads_enable and return 0/-1 which existing gobject based applications expect. svn path=/trunk/; revision=927
* Change return value from 'gboolean' to 'int' and changed semantics toPaul Pogonyshev2008-08-031-1/+1
| | | | | | | | | | | | | | 2008-08-03 Paul Pogonyshev <pogonyshev@gmx.net> * glib/pyglib.h: * glib/pyglib.c (pyglib_enable_threads): Change return value from 'gboolean' to 'int' and changed semantics to Pythonic: restores backwards compatibility. * gobject/gobjectmodule.c (pyg_threads_init): Treat return value accordingly (bug #544946). svn path=/trunk/; revision=922
* Move all compatibility into the same place, fixes build on python 2.4.Johan Dahlin2008-07-281-19/+0
| | | | | | | | | | | | 2008-07-28 Johan Dahlin <johan@gnome.org> * glib/pyglib-python-compat.h: * gobject/pygobject-private.h: Move all compatibility into the same place, fixes build on python 2.4. svn path=/trunk/; revision=890
* Remove unnecessary spacingJohan Dahlin2008-07-281-2/+2
| | | | svn path=/trunk/; revision=888
* Remove tabs. Use sys.exc_info()[1] to fetch the exception valueJohan Dahlin2008-07-275-29/+44
| | | | | | | | | | | | | | | | | | | 2008-07-27 Johan Dahlin <johan@gnome.org> * glib/option.py: Remove tabs. Use sys.exc_info()[1] to fetch the exception value * gobject/__init__.py: * gobject/propertyhelper.py: Import gobject._gobject instead of just gobject. * gobject/Makefile.am: * gobject/constants.py.in: * gobject/generate-constants.c (main): Don't add long suffix if python >= 3.0 svn path=/trunk/; revision=887
* Use the Py_TYPE macro everywhere.Johan Dahlin2008-07-278-29/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Add a Py_TYPE macro for accessing ob_type.Johan Dahlin2008-07-273-24/+36
| | | | | | | | | | | | | | | | | | | | | 2008-07-27 Johan Dahlin <johan@gnome.org> * glib/pyglib-python-compat.h: Add a Py_TYPE macro for accessing ob_type. * glib/glibmodule.c (pyglib_register_constants): * gobject/gobjectmodule.c (pygobject__g_instance_init), (pyg_integer_richcompare): * gobject/pygenum.c (pyg_enum_repr), (pyg_enum_from_gtype), (pyg_enum_add), (pyg_enum_get_value_name), (pyg_enum_get_value_nick): * gobject/pygflags.c (pyg_flags_repr), (pyg_flags_from_gtype), (pyg_flags_add), (pyg_flags_and), (pyg_flags_or), (pyg_flags_xor), (pyg_flags_get_first_value_name), (pyg_flags_get_first_value_nick), (pyg_flags_get_value_names), (pyg_flags_get_value_nicks): Use Py_TYPE and PyLong macros to access struct fields svn path=/trunk/; revision=885
* Use _PyLong macros.Johan Dahlin2008-07-277-66/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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-277-496/+130
| | | | | | | | | | | | | | | | | 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-278-78/+78
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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