diff options
Diffstat (limited to 'plugins/dex/python')
| -rw-r--r-- | plugins/dex/python/class.c | 6 | ||||
| -rw-r--r-- | plugins/dex/python/field.c | 6 | ||||
| -rw-r--r-- | plugins/dex/python/format.c | 5 | ||||
| -rw-r--r-- | plugins/dex/python/method.c | 6 | ||||
| -rw-r--r-- | plugins/dex/python/pool.c | 2 | ||||
| -rw-r--r-- | plugins/dex/python/routine.c | 5 | 
6 files changed, 18 insertions, 12 deletions
| diff --git a/plugins/dex/python/class.c b/plugins/dex/python/class.c index e344124..247197c 100644 --- a/plugins/dex/python/class.c +++ b/plugins/dex/python/class.c @@ -584,14 +584,14 @@ PyTypeObject *get_python_dex_class_type(void)  bool register_python_dex_class(PyObject *module)  { -    PyTypeObject *py_dex_class_type;        /* Type Python 'DexClass'      */ +    PyTypeObject *type;                     /* Type Python 'DexClass'      */      PyObject *dict;                         /* Dictionnaire du module      */ -    py_dex_class_type = get_python_dex_class_type(); +    type = get_python_dex_class_type();      dict = PyModule_GetDict(module); -    if (!register_class_for_pygobject(dict, G_TYPE_DEX_CLASS, py_dex_class_type, &PyGObject_Type)) +    if (!register_class_for_pygobject(dict, G_TYPE_DEX_CLASS, type))          return false;      return true; diff --git a/plugins/dex/python/field.c b/plugins/dex/python/field.c index 1381af6..081d0af 100644 --- a/plugins/dex/python/field.c +++ b/plugins/dex/python/field.c @@ -181,14 +181,14 @@ PyTypeObject *get_python_dex_field_type(void)  bool register_python_dex_field(PyObject *module)  { -    PyTypeObject *py_dex_field_type;        /* Type Python 'DexField'     */ +    PyTypeObject *type;                     /* Type Python 'DexField'     */      PyObject *dict;                         /* Dictionnaire du module      */ -    py_dex_field_type = get_python_dex_field_type(); +    type = get_python_dex_field_type();      dict = PyModule_GetDict(module); -    if (!register_class_for_pygobject(dict, G_TYPE_DEX_FIELD, py_dex_field_type, &PyGObject_Type)) +    if (!register_class_for_pygobject(dict, G_TYPE_DEX_FIELD, type))          return false;      return true; diff --git a/plugins/dex/python/format.c b/plugins/dex/python/format.c index fa65b25..4a8939b 100644 --- a/plugins/dex/python/format.c +++ b/plugins/dex/python/format.c @@ -281,7 +281,10 @@ bool register_python_dex_format(PyObject *module)      dict = PyModule_GetDict(module); -    if (!register_class_for_pygobject(dict, G_TYPE_DEX_FORMAT, type, get_python_executable_format_type())) +    if (!ensure_python_executable_format_is_registered()) +        return false; + +    if (!register_class_for_pygobject(dict, G_TYPE_DEX_FORMAT, type))          return false;      if (!define_python_dex_format_common_constants(type)) diff --git a/plugins/dex/python/method.c b/plugins/dex/python/method.c index fc56f29..ed67176 100644 --- a/plugins/dex/python/method.c +++ b/plugins/dex/python/method.c @@ -291,14 +291,14 @@ PyTypeObject *get_python_dex_method_type(void)  bool register_python_dex_method(PyObject *module)  { -    PyTypeObject *py_dex_method_type;       /* Type Python 'DexMethod'     */ +    PyTypeObject *type;                     /* Type Python 'DexMethod'     */      PyObject *dict;                         /* Dictionnaire du module      */ -    py_dex_method_type = get_python_dex_method_type(); +    type = get_python_dex_method_type();      dict = PyModule_GetDict(module); -    if (!register_class_for_pygobject(dict, G_TYPE_DEX_METHOD, py_dex_method_type, &PyGObject_Type)) +    if (!register_class_for_pygobject(dict, G_TYPE_DEX_METHOD, type))          return false;      return true; diff --git a/plugins/dex/python/pool.c b/plugins/dex/python/pool.c index ddfc900..0c08865 100644 --- a/plugins/dex/python/pool.c +++ b/plugins/dex/python/pool.c @@ -822,7 +822,7 @@ bool register_python_dex_pool(PyObject *module)      dict = PyModule_GetDict(module); -    if (!register_class_for_pygobject(dict, G_TYPE_DEX_POOL, type, &PyGObject_Type)) +    if (!register_class_for_pygobject(dict, G_TYPE_DEX_POOL, type))          return false;      return true; diff --git a/plugins/dex/python/routine.c b/plugins/dex/python/routine.c index 31410c7..af38263 100644 --- a/plugins/dex/python/routine.c +++ b/plugins/dex/python/routine.c @@ -165,7 +165,10 @@ bool register_python_dex_routine(PyObject *module)      dict = PyModule_GetDict(module); -    if (!register_class_for_pygobject(dict, G_TYPE_DEX_ROUTINE, type, get_python_binary_routine_type())) +    if (!ensure_python_binary_routine_is_registered()) +        return false; + +    if (!register_class_for_pygobject(dict, G_TYPE_DEX_ROUTINE, type))          return false;      return true; | 
