summaryrefslogtreecommitdiff
path: root/plugins/pychrysalide/arch/module.c
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2018-12-13 21:53:43 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2018-12-13 21:53:43 (GMT)
commitccf90bf696a0852ef34ac2a86137b34e92827ec0 (patch)
treed43c65faf4316d8a55d67c74f363f3f4371068cd /plugins/pychrysalide/arch/module.c
parent0c6e15aa59918b7d3a1e63258e3f6792266d62e0 (diff)
Renamed the function registering C constant values into Python objects.
Diffstat (limited to 'plugins/pychrysalide/arch/module.c')
-rw-r--r--plugins/pychrysalide/arch/module.c46
1 files changed, 23 insertions, 23 deletions
diff --git a/plugins/pychrysalide/arch/module.c b/plugins/pychrysalide/arch/module.c
index db514ef..40b8d71 100644
--- a/plugins/pychrysalide/arch/module.c
+++ b/plugins/pychrysalide/arch/module.c
@@ -69,25 +69,25 @@ static bool py_base_define_constants(PyTypeObject *obj_type)
result = true;
- if (result) result = PyDict_AddIntMacro(obj_type, MDS_UNDEFINED);
-
- if (result) result = PyDict_AddIntMacro(obj_type, MDS_4_BITS_UNSIGNED);
- if (result) result = PyDict_AddIntMacro(obj_type, MDS_8_BITS_UNSIGNED);
- if (result) result = PyDict_AddIntMacro(obj_type, MDS_16_BITS_UNSIGNED);
- if (result) result = PyDict_AddIntMacro(obj_type, MDS_32_BITS_UNSIGNED);
- if (result) result = PyDict_AddIntMacro(obj_type, MDS_64_BITS_UNSIGNED);
-
- if (result) result = PyDict_AddIntMacro(obj_type, MDS_4_BITS_SIGNED);
- if (result) result = PyDict_AddIntMacro(obj_type, MDS_8_BITS_SIGNED);
- if (result) result = PyDict_AddIntMacro(obj_type, MDS_16_BITS_SIGNED);
- if (result) result = PyDict_AddIntMacro(obj_type, MDS_32_BITS_SIGNED);
- if (result) result = PyDict_AddIntMacro(obj_type, MDS_64_BITS_SIGNED);
-
- if (result) result = PyDict_AddIntMacro(obj_type, MDS_4_BITS);
- if (result) result = PyDict_AddIntMacro(obj_type, MDS_8_BITS);
- if (result) result = PyDict_AddIntMacro(obj_type, MDS_16_BITS);
- if (result) result = PyDict_AddIntMacro(obj_type, MDS_32_BITS);
- if (result) result = PyDict_AddIntMacro(obj_type, MDS_64_BITS);
+ if (result) result = PyDict_AddULongMacro(obj_type, MDS_UNDEFINED);
+
+ if (result) result = PyDict_AddULongMacro(obj_type, MDS_4_BITS_UNSIGNED);
+ if (result) result = PyDict_AddULongMacro(obj_type, MDS_8_BITS_UNSIGNED);
+ if (result) result = PyDict_AddULongMacro(obj_type, MDS_16_BITS_UNSIGNED);
+ if (result) result = PyDict_AddULongMacro(obj_type, MDS_32_BITS_UNSIGNED);
+ if (result) result = PyDict_AddULongMacro(obj_type, MDS_64_BITS_UNSIGNED);
+
+ if (result) result = PyDict_AddULongMacro(obj_type, MDS_4_BITS_SIGNED);
+ if (result) result = PyDict_AddULongMacro(obj_type, MDS_8_BITS_SIGNED);
+ if (result) result = PyDict_AddULongMacro(obj_type, MDS_16_BITS_SIGNED);
+ if (result) result = PyDict_AddULongMacro(obj_type, MDS_32_BITS_SIGNED);
+ if (result) result = PyDict_AddULongMacro(obj_type, MDS_64_BITS_SIGNED);
+
+ if (result) result = PyDict_AddULongMacro(obj_type, MDS_4_BITS);
+ if (result) result = PyDict_AddULongMacro(obj_type, MDS_8_BITS);
+ if (result) result = PyDict_AddULongMacro(obj_type, MDS_16_BITS);
+ if (result) result = PyDict_AddULongMacro(obj_type, MDS_32_BITS);
+ if (result) result = PyDict_AddULongMacro(obj_type, MDS_64_BITS);
/**
* Comme il existe déjà le module struct, de nouvelles primitives de
@@ -97,10 +97,10 @@ static bool py_base_define_constants(PyTypeObject *obj_type)
* pour exporter les constantes suivantes.
*/
- if (result) result = PyDict_AddIntMacro(obj_type, SRE_LITTLE);
- if (result) result = PyDict_AddIntMacro(obj_type, SRE_LITTLE_WORD);
- if (result) result = PyDict_AddIntMacro(obj_type, SRE_BIG_WORD);
- if (result) result = PyDict_AddIntMacro(obj_type, SRE_BIG);
+ if (result) result = PyDict_AddULongMacro(obj_type, SRE_LITTLE);
+ if (result) result = PyDict_AddULongMacro(obj_type, SRE_LITTLE_WORD);
+ if (result) result = PyDict_AddULongMacro(obj_type, SRE_BIG_WORD);
+ if (result) result = PyDict_AddULongMacro(obj_type, SRE_BIG);
return result;