summaryrefslogtreecommitdiff
path: root/gi/pygi-value.c
Commit message (Collapse)AuthorAgeFilesLines
* Don't use GI type for determining pointer extraction from GValuesSimon Feltman2014-08-181-6/+4
| | | | | | Replace usage of g_type_is_a() with G_VALUE_HOLDS() when extracting pointers from GValues being marshalled from properties and signals. This fixes fallout from commit abdfb0f.
* Fast path property access for basic typesSimon Feltman2014-08-171-8/+18
| | | | | | | | | | Attempt marshalling with pygi_value_to_py_basic_type() prior to looking at GI info. This gives a quick conversion for basic types like bools, ints, and strings without having to go through GIArgument and GI conversions. This gives approximately a 3x performance boost for accessing these types with the unified GValue marshaller. https://bugzilla.gnome.org/show_bug.cgi?id=726999
* Break pyg_value_as_pyobject into two functionsSimon Feltman2014-08-171-12/+62
| | | | | | | | | Add pygi_value_to_py_basic_type() which is limited to handling basic types that don't need introspection information when marshalling to Python. Add pygi_value_to_py_structured_type() for marshalling of structured data which can eventually accept GI type hints. https://bugzilla.gnome.org/show_bug.cgi?id=726999
* Merge pygi_get_property_value and _pygi_argument_from_g_valueSimon Feltman2014-08-171-7/+17
| | | | | | | | | | | Merge duplicated GValue marshaling code which has diverged over time (commits 3606eb20, ee62df4d, e14ebab6, 8cfd596c, 9f50fd21, 0d099bdb, and 216caf59). Use _pygi_argument_to_array within pygi_get_property_value. This is needed in the new code for supporting GI_TYPE_TAG_ARRAY and also fixes bug 669496. Side effects of this change also include support for properties holding G_TYPE_FLAGS and G_TYPE_PARAM. https://bugzilla.gnome.org/show_bug.cgi?id=726999
* Never dup data structures when marshaling signal in argumentsSimon Feltman2014-08-171-1/+3
| | | | | | | | Always assume transfer-none of GValue arguments to signal handlers. A signal handler with arguments marked as transfer-full does not make any sense, so assume they are always transfer-none. https://bugzilla.gnome.org/show_bug.cgi?id=726999
* Use accessors for getting and setting PyGParamSpec pointersSimon Feltman2014-05-161-1/+1
| | | | | | | | Add pyg_param_spec_get and pyg_param_spec_set macros for getting and setting the GParamSpec pointer field held by the Python wrapper. This is preliminary cleanup work for supporting fundamental types. https://bugzilla.gnome.org/show_bug.cgi?id=631901
* Ignore GValueArray deprecationsSimon Feltman2014-03-241-3/+20
| | | | | | | | Wrap calls to GValueArray related calls with G_GNUC_BEGIN/END_IGNORE_DEPRECATIONS. Although GValueArray is deprecated, we still need to support the marshaling of them in PyGObject. The deprecations add noise to the build processes in which new warnings could be lost. Essentially losing the element of surprise a new warning should have on maintainers.
* marshal refactoring: Move GValue marshaling from pytype into pygi-valueSimon Feltman2014-02-021-1/+719
| | | | | | | Move marshaling of GValues to and from PyObjects into pygi-value.c. Make PyGTypeMarshal struct and related functions accessible via pygtype.h. https://bugzilla.gnome.org/show_bug.cgi?id=709700
* marshal refactoring: Move GIArgument from GValue code to new fileSimon Feltman2014-02-021-0/+144
Add gi/pygi-value.h and .c files with initial contents of _pygi_argument_from_g_value. Eventually this file will contain all code related to GValue marshaling from various code locations in the project. https://bugzilla.gnome.org/show_bug.cgi?id=709700