diff options
Diffstat (limited to 'plugins/pychrysalide/helpers.h')
-rw-r--r-- | plugins/pychrysalide/helpers.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/plugins/pychrysalide/helpers.h b/plugins/pychrysalide/helpers.h index 32851c0..2285259 100644 --- a/plugins/pychrysalide/helpers.h +++ b/plugins/pychrysalide/helpers.h @@ -277,6 +277,15 @@ int convert_to_gdk_rgba(PyObject *, void *); }) +#define TRANSLATE_NUMERIC_FIELD(dict, base, field) \ + ({ \ + PyObject *__attrib; \ + __attrib = PyLong_FromUnsignedLongLong(base->field); \ + Py_INCREF(__attrib); \ + ADD_FIELD_TRANSLATION(dict, #field, __attrib); \ + }) + + #define TRANSLATE_STRING_FIELD(dict, base, field) \ ({ \ PyObject *__attrib; \ |