summaryrefslogtreecommitdiff
path: root/gi/pygi-ccallback.c
Commit message (Collapse)AuthorAgeFilesLines
* Rename PYGLIB_DEFINE_TYPE to PYGI_DEFINE_TYPEChristoph Reiter2020-04-161-1/+1
| | | | This is a leftover from when things were split up
* Remove all Python 2 C codeChristoph Reiter2020-04-161-1/+1
|
* Add error handling to all type init function.Christoph Reiter2018-03-231-6/+14
| | | | | They were all just ignoring errors. Also change those functions to use the pygi prefix.
* Rename pyglib-python-compat.h to pygi-python-compat.hChristoph Reiter2018-03-231-1/+1
| | | | There is no pyglib anymore
* Remove pygobject-private.h and rename pygobject.c to pygobject-object.cChristoph Reiter2016-06-011-1/+0
| | | | | | | | | | | | | | | | | | | Move all the random declarations in pygobject-private.h to their respective header files. Rename pygobject.c to pygobject-object.c so it's clearer that it's not the implementation of pygobject.h. Add a new pygobject-internal.h which includes pygobject.h with _INSIDE_PYGOBJECT_ defined like pygobject-private.h did. In case you are looking at the git log and end up here due to the rename try: git log --follow pygobject-object.c or on the web interface go to the history of the old file name: https://git.gnome.org/browse/pygobject/log/gi/pygobject.c?id=6b702c052e9f26e809cff494f0c896d17a514c64 https://bugzilla.gnome.org/show_bug.cgi?id=767084
* Remove pygi.h and pygi-private.hChristoph Reiter2016-06-011-1/+1
| | | | | | Instead include things where needed. https://bugzilla.gnome.org/show_bug.cgi?id=767084
* Remove incorrect and unused casts from tp_free callsSimon Feltman2014-08-081-1/+1
| | | | | Arguments to Py_TYPE() do not need to be cast since the macro always casts to a PyObject* internall.
* Fix GCallback Python wrapper leakSimon Feltman2014-08-081-0/+2
| | | | | | | The PyObject wrapper for GCallbacks was not calling tp_free in the custom tp_dealloc class method. https://bugzilla.gnome.org/show_bug.cgi?id=695130
* Split the callable cache into the different typesGarrett Regier2014-08-061-6/+10
| | | | | | | | | | | | Instead of doing different things based on the various function types this adds vfuncs for generate_args_cache() and invoke() which are then specialized for the various function types. Also add a calling context to the callable cache which is then used to determine the direction when generating the arg caches. This is in preparation for adding closure caches. https://bugzilla.gnome.org/show_bug.cgi?id=727004
* Update Free Software Foundation addressesSimon Feltman2014-03-151-3/+1
| | | | | Update all references to the FSF physical address to use the web address: http://www.gnu.org/licenses
* Use ffi_call directly instead of g_callable_info_invokeSimon Feltman2014-03-031-2/+1
| | | | | | | | | | | | | | | | | | | | | Cleanup internal callable cache and state tracking by removing multiple counting schemes for differently sized "in" and "out" argument arrays. Use a single count based on the total number of arguments passed to C (inclusive of instance argument and GError exception where applicable). Size all state tracking arrays to the same size and ensure argument cache indices always line up with these arrays. This cleans up logic which was required by g_callable_info_invoke for splitting "in" and "out" arguments up. Cleanup array marshaling which can now rely on the new scheme which ensures the "arg_values" array always points to the correct location for length argument values. Cache the ffi_cif struct in PyGICallableCache via GIFunctionInvoker and related GI methods. Overall, these changes can give a performance boost of almost 2x for simple function calls (see ticket for micro benchmarks). https://bugzilla.gnome.org/show_bug.cgi?id=723642
* cache refactoring: Use consistent prefix for arg cache functionsSimon Feltman2014-02-031-1/+1
| | | | | | Use "pygi_arg_cache" as the prefix for arg cache memory related functions. https://bugzilla.gnome.org/show_bug.cgi?id=709700
* Merge gobject static code into the gi moduleSimon Feltman2014-01-141-1/+1
| | | | | | | | Remove gi._gobject._gobject as a separately compiled static module and move all the files into gi._gi. Remove dead module initialization macros from "pyglib-python-compat.h" https://bugzilla.gnome.org/show_bug.cgi?id=712197
* Fix unused variables and resultsMartin Pitt2012-09-251-1/+0
| | | | This gets rid of all warnings except the deprecated symbol ones.
* Add a ccallback type which is used to invoke callbacks passed to a vfuncJohn (J5) Palmieri2012-03-271-0/+100
Used when overriding methods like gtk_container_forall wich pass in a callback that needs to be executed on internal children: def do_forall(self, callback, userdata): callback(self.custom_child, userdata) https://bugzilla.gnome.org/show_bug.cgi?id=644926 Co-authored-by: Tomeu Vizoso <tomeu.vizoso@collabora.co.uk> Co-authored-by: Simon Schampijer <simon@laptop.org> Signed-off-by: Martin Pitt <martinpitt@gnome.org>