summaryrefslogtreecommitdiff
path: root/plugins/pychrysalide/format/constants.c
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2019-08-14 20:53:39 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2019-08-14 20:53:39 (GMT)
commit60b70b8701c822eddc65269773621690932a57bd (patch)
treed3a033c86eb091e3d81dec77b0855406d737596d /plugins/pychrysalide/format/constants.c
parent2c97b766469c25b09c3b173aa6b8abdb066671c1 (diff)
Updated the Python bindings for binary symbols.
Diffstat (limited to 'plugins/pychrysalide/format/constants.c')
-rw-r--r--plugins/pychrysalide/format/constants.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/plugins/pychrysalide/format/constants.c b/plugins/pychrysalide/format/constants.c
index 9e63fdd..ea2aedc 100644
--- a/plugins/pychrysalide/format/constants.c
+++ b/plugins/pychrysalide/format/constants.c
@@ -51,6 +51,25 @@ bool define_binary_symbol_constants(PyTypeObject *type)
values = PyDict_New();
+ result = add_const_to_group(values, "DATA", STP_DATA);
+ if (result) result = add_const_to_group(values, "ROUTINE", STP_ROUTINE);
+ if (result) result = add_const_to_group(values, "CODE_LABEL", STP_CODE_LABEL);
+ if (result) result = add_const_to_group(values, "OBJECT", STP_OBJECT);
+ if (result) result = add_const_to_group(values, "ENTRY_POINT", STP_ENTRY_POINT);
+ if (result) result = add_const_to_group(values, "RO_STRING", STP_RO_STRING);
+ if (result) result = add_const_to_group(values, "DYN_STRING", STP_DYN_STRING);
+ if (result) result = add_const_to_group(values, "COUNT", STP_COUNT);
+
+ if (!result)
+ {
+ Py_DECREF(values);
+ goto exit;
+ }
+
+ result = attach_constants_group(type, false, "SymbolType", values, "Available values for symbol types.");
+
+ values = PyDict_New();
+
result = add_const_to_group(values, "INTERNAL", SSS_INTERNAL);
if (result) result = add_const_to_group(values, "EXPORTED", SSS_EXPORTED);
if (result) result = add_const_to_group(values, "IMPORTED", SSS_IMPORTED);