summaryrefslogtreecommitdiff
path: root/gi/pygi-basictype.h
diff options
context:
space:
mode:
authorSimon Feltman <sfeltman@src.gnome.org>2013-10-11 20:12:01 -0700
committerSimon Feltman <sfeltman@src.gnome.org>2014-02-02 16:02:57 -0800
commitc1a2a86a7b51f4dc5a5da9f8808552c38acadf9d (patch)
tree82de923fdba9a8d3cb85631dd34b1b2c13118642 /gi/pygi-basictype.h
parent4a6bf3be49cc5aec7287c41ec02c78d60df1d44c (diff)
downloadpygobject-c1a2a86a7b51f4dc5a5da9f8808552c38acadf9d.tar.gz
cache refactoring: Move basic type arg setup and marshaling into new file
Move all basic type arg caching and marshaling fragments into an isolated file where most functions are made static. pygi-basictype.h exposes: pygi_arg_basic_type_new_from_info, _pygi_marshal_from_py_basic_type, and _pygi_marshal_to_py_basic_type which allows continued use for all marshaling code paths. https://bugzilla.gnome.org/show_bug.cgi?id=709700
Diffstat (limited to 'gi/pygi-basictype.h')
-rw-r--r--gi/pygi-basictype.h42
1 files changed, 42 insertions, 0 deletions
diff --git a/gi/pygi-basictype.h b/gi/pygi-basictype.h
new file mode 100644
index 00000000..7207e542
--- /dev/null
+++ b/gi/pygi-basictype.h
@@ -0,0 +1,42 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * vim: tabstop=4 shiftwidth=4 expandtab
+ *
+ * Copyright (C) 2014 Simon Feltman <sfeltman@gnome.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef __PYGI_ARG_BASICTYPE_H__
+#define __PYGI_ARG_BASICTYPE_H__
+
+#include <girepository.h>
+#include "pygi-cache.h"
+
+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);
+G_END_DECLS
+
+#endif /*__PYGI_ARG_BASICTYPE_H__*/