summaryrefslogtreecommitdiff
path: root/gi/pygi-basictype.h
diff options
context:
space:
mode:
authorChristoph Reiter <reiter.christoph@gmail.com>2018-04-23 13:45:53 +0200
committerChristoph Reiter <reiter.christoph@gmail.com>2018-04-23 16:01:39 +0200
commit19943e1dafbaffbbe368ba13029b784d916d998c (patch)
tree20cd4826670dd82b53944861de47d356dbd01e11 /gi/pygi-basictype.h
parent82c1c0c3cf5090d2f9fd72d0520abba35b7b04e9 (diff)
downloadpygobject-19943e1dafbaffbbe368ba13029b784d916d998c.tar.gz
Add pygi_gschar_from_py/pygi_guchar_from_py; add tests
The gvalue code had special code for handling G_TYPE_CHAR/UCHAR allowing as input roughly what u/int8 allows plus unicode. Since GI maps g(u)char to u/int8 it's a good idea that both support the same input ranges for numbers/bytes so that there is no difference between gtype/GI. pygi_gschar_from_py is a superset of gint8 + unicode. pygi_guchar_from_py is a superset of guint8 + unicode.
Diffstat (limited to 'gi/pygi-basictype.h')
-rw-r--r--gi/pygi-basictype.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/gi/pygi-basictype.h b/gi/pygi-basictype.h
index 396cedc9..04d520a7 100644
--- a/gi/pygi-basictype.h
+++ b/gi/pygi-basictype.h
@@ -66,6 +66,7 @@ PyObject *pygi_gulong_to_py (gulong value);
PyObject *pygi_filename_to_py (gchar *value);
PyObject *pygi_gsize_to_py (gsize value);
PyObject *pygi_gssize_to_py (gssize value);
+PyObject *pygi_guint32_to_py (guint32 value);
gboolean pygi_gboolean_from_py (PyObject *object, gboolean *result);
gboolean pygi_gint64_from_py (PyObject *object, gint64 *result);
@@ -78,6 +79,10 @@ gboolean pygi_gulong_from_py (PyObject *object, gulong *result);
gboolean pygi_gint_from_py (PyObject *object, gint *result);
gboolean pygi_guint_from_py (PyObject *object, guint *result);
gboolean pygi_gunichar_from_py (PyObject *py_arg, gunichar *result);
+gboolean pygi_gint8_from_py (PyObject *object, gint8 *result);
+gboolean pygi_gschar_from_py (PyObject *object, gint8 *result);
+gboolean pygi_guint8_from_py (PyObject *object, guint8 *result);
+gboolean pygi_guchar_from_py (PyObject *object, guchar *result);
G_END_DECLS