diff options
author | Garrett Regier <Garrett.Regier@riftio.com> | 2014-08-06 15:30:58 -0400 |
---|---|---|
committer | Garrett Regier <Garrett.Regier@riftio.com> | 2014-08-07 15:33:51 -0400 |
commit | d7b9ef0f5411ebcbb2597c16b221fd3482c535e4 (patch) | |
tree | 93fe636fa2facd35d0e7ceb7486c8d07b374dbd3 /gi/pygi-basictype.h | |
parent | 9337acf98d783777c94d4bcb912a185ba6791efb (diff) | |
download | pygobject-d7b9ef0f5411ebcbb2597c16b221fd3482c535e4.tar.gz |
Use the caches for marshaling the arguments in closures
Changes to object marshaling when the calling context is from
C was required to correctly keep the correct floating status.
The array cache has been modified to set to/from_py_marshaller
for the length arg cache. This is required for closures which include
the length arg for backwards compatibility. The closure cache takes
care to change the length arg cache's meta type so it gets marshalled
for closures.
https://bugzilla.gnome.org/show_bug.cgi?id=727004
Diffstat (limited to 'gi/pygi-basictype.h')
-rw-r--r-- | gi/pygi-basictype.h | 36 |
1 files changed, 24 insertions, 12 deletions
diff --git a/gi/pygi-basictype.h b/gi/pygi-basictype.h index 7207e542..466c7d4a 100644 --- a/gi/pygi-basictype.h +++ b/gi/pygi-basictype.h @@ -25,18 +25,30 @@ G_BEGIN_DECLS -gboolean _pygi_marshal_from_py_basic_type (PyObject *object, /* in */ - GIArgument *arg, /* out */ - GITypeTag type_tag, - GITransfer transfer, - gpointer *cleanup_data); -PyObject *_pygi_marshal_to_py_basic_type (GIArgument *arg, /* in */ - GITypeTag type_tag, - GITransfer transfer); -PyGIArgCache *pygi_arg_basic_type_new_from_info (GITypeInfo *type_info, - GIArgInfo *arg_info, /* may be null */ - GITransfer transfer, - PyGIDirection direction); +gboolean _pygi_marshal_from_py_basic_type (PyObject *object, /* in */ + GIArgument *arg, /* out */ + GITypeTag type_tag, + GITransfer transfer, + gpointer *cleanup_data); +gboolean _pygi_marshal_from_py_basic_type_cache_adapter (PyGIInvokeState *state, + PyGICallableCache *callable_cache, + PyGIArgCache *arg_cache, + PyObject *py_arg, + GIArgument *arg, + gpointer *cleanup_data); + +PyObject *_pygi_marshal_to_py_basic_type (GIArgument *arg, /* in */ + GITypeTag type_tag, + GITransfer transfer); +PyObject *_pygi_marshal_to_py_basic_type_cache_adapter (PyGIInvokeState *state, + PyGICallableCache *callable_cache, + PyGIArgCache *arg_cache, + GIArgument *arg); + +PyGIArgCache *pygi_arg_basic_type_new_from_info (GITypeInfo *type_info, + GIArgInfo *arg_info, /* may be null */ + GITransfer transfer, + PyGIDirection direction); G_END_DECLS #endif /*__PYGI_ARG_BASICTYPE_H__*/ |