summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2020-05-18 10:21:16 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2020-05-18 10:21:16 (GMT)
commit4f18f051936f633473c365d4c91ef7e77fa7feee (patch)
treee49603b80667a8cb2fc4592b5d4248f7cdf3494a
parentd110791309783e6e30df837a81cf8e14e1ac9641 (diff)
Renamed the [Py]StructObject.
-rw-r--r--plugins/dex/python/format.c22
-rw-r--r--plugins/dex/python/method.c6
-rw-r--r--plugins/dex/python/pool.c118
-rw-r--r--plugins/elf/python/dynamic.h4
-rw-r--r--plugins/pychrysalide/analysis/db/client.c22
-rw-r--r--plugins/pychrysalide/struct.c28
-rw-r--r--plugins/pychrysalide/struct.h2
7 files changed, 101 insertions, 101 deletions
diff --git a/plugins/dex/python/format.c b/plugins/dex/python/format.c
index c1e4c40..fa65b25 100644
--- a/plugins/dex/python/format.c
+++ b/plugins/dex/python/format.c
@@ -128,17 +128,17 @@ static PyObject *py_dex_format_read_type_list(PyObject *self, PyObject *args)
bool status; /* Bilan de l'opération */
uint32_t i; /* Boucle de parcours */
-#define DEX_POOL_READ_TYPE_LIST_METHOD PYTHON_METHOD_DEF \
-( \
- read_type_list, "$self, offset, /", \
- METH_VARARGS, py_dex_format, \
- "Provide the raw data of a given type list as an array of pychrysalide.PyStructObject" \
- " instances." \
- "\n" \
- "All the items are fields extracted from the Dex *type_list* structure:\n" \
- "* type_idx: index into the *type_ids* list.\n" \
- "\n" \
- "In case of error, the function returns None." \
+#define DEX_POOL_READ_TYPE_LIST_METHOD PYTHON_METHOD_DEF \
+( \
+ read_type_list, "$self, offset, /", \
+ METH_VARARGS, py_dex_format, \
+ "Provide the raw data of a given type list as an array of pychrysalide.StructObject" \
+ " instances." \
+ "\n" \
+ "All the items are fields extracted from the Dex *type_list* structure:\n" \
+ "* type_idx: index into the *type_ids* list.\n" \
+ "\n" \
+ "In case of error, the function returns None." \
)
ret = PyArg_ParseTuple(args, "I", &offset);
diff --git a/plugins/dex/python/method.c b/plugins/dex/python/method.c
index fab8e2e..fc56f29 100644
--- a/plugins/dex/python/method.c
+++ b/plugins/dex/python/method.c
@@ -77,7 +77,7 @@ static PyObject *py_dex_method_get_id_item(PyObject *self, void *closure)
#define DEX_METHOD_ID_ITEM_ATTRIB PYTHON_GET_DEF_FULL \
( \
id_item, py_dex_method, \
- "pychrysalide.PyStructObject instance of identifiers used by the method.\n" \
+ "pychrysalide.StructObject instance of identifiers used by the method.\n" \
"\n" \
"All the fields are extracted from the Dex *method_id_item* structure:\n" \
"* class_idx: index into the *type_ids* list for the definer of the method ;\n" \
@@ -118,7 +118,7 @@ static PyObject *py_dex_method_get_encoded(PyObject *self, void *closure)
#define DEX_METHOD_ENCODED_ATTRIB PYTHON_GET_DEF_FULL \
( \
encoded, py_dex_method, \
- "pychrysalide.PyStructObject instance for encoded information about the Dex method.\n" \
+ "pychrysalide.StructObject instance for encoded information about the Dex method.\n" \
"\n" \
"All the fields are extracted from the Dex *encoded_method* structure:\n" \
"* method_idx_diff: index into the *method_ids* list for the identity of the method ;\n" \
@@ -159,7 +159,7 @@ static PyObject *py_dex_method_get_code_item(PyObject *self, void *closure)
#define DEX_METHOD_CODE_ITEM_ATTRIB PYTHON_GET_DEF_FULL \
( \
code_item, py_dex_method, \
- "pychrysalide.PyStructObject instance of code information about the Dex method," \
+ "pychrysalide.StructObject instance of code information about the Dex method," \
" or None if none.\n" \
"\n" \
"All the fields are extracted from the Dex *code_item* structure:\n" \
diff --git a/plugins/dex/python/pool.c b/plugins/dex/python/pool.c
index f68fe98..ddfc900 100644
--- a/plugins/dex/python/pool.c
+++ b/plugins/dex/python/pool.c
@@ -100,19 +100,19 @@ static PyObject *py_dex_pool_get_raw_type(PyObject *self, PyObject *args)
type_id_item type_id; /* Elément à transmettre */
bool status; /* Bilan de l'opération */
-#define DEX_POOL_GET_RAW_TYPE_METHOD PYTHON_METHOD_DEF \
-( \
- get_raw_type, "$self, index, /", \
- METH_VARARGS, py_dex_pool, \
- "Provide the raw data of a given type in the Dex pool as a pychrysalide.PyStructObject" \
- " instance." \
- "\n" \
- "Indexes start at 0.\n" \
- "\n" \
- "All the fields are extracted from the Dex *type_id_item* structure:\n" \
- "* descriptor_idx: index into the string_ids list for the descriptor string.\n" \
- "\n" \
- "In case of error, the function returns None." \
+#define DEX_POOL_GET_RAW_TYPE_METHOD PYTHON_METHOD_DEF \
+( \
+ get_raw_type, "$self, index, /", \
+ METH_VARARGS, py_dex_pool, \
+ "Provide the raw data of a given type in the Dex pool as a pychrysalide.StructObject" \
+ " instance." \
+ "\n" \
+ "Indexes start at 0.\n" \
+ "\n" \
+ "All the fields are extracted from the Dex *type_id_item* structure:\n" \
+ "* descriptor_idx: index into the string_ids list for the descriptor string.\n" \
+ "\n" \
+ "In case of error, the function returns None." \
)
ret = PyArg_ParseTuple(args, "I", &index);
@@ -158,21 +158,21 @@ static PyObject *py_dex_pool_get_raw_field(PyObject *self, PyObject *args)
field_id_item field_id; /* Elément à transmettre */
bool status; /* Bilan de l'opération */
-#define DEX_POOL_GET_RAW_FIELD_METHOD PYTHON_METHOD_DEF \
-( \
- get_raw_field, "$self, index, /", \
- METH_VARARGS, py_dex_pool, \
- "Provide the raw data of a given field in the Dex pool as a pychrysalide.PyStructObject" \
- " instance." \
- "\n" \
- "Indexes start at 0.\n" \
- "\n" \
- "All the fields are extracted from the Dex *field_id_item* structure:\n" \
- "* class_idx: index into the type_ids list for the definer of the field ;\n" \
- "* type_idx: index into the type_ids list for the type of the field ;\n" \
- "* name_idx: index into the string_ids list for the name of the field.\n" \
- "\n" \
- "In case of error, the function returns None." \
+#define DEX_POOL_GET_RAW_FIELD_METHOD PYTHON_METHOD_DEF \
+( \
+ get_raw_field, "$self, index, /", \
+ METH_VARARGS, py_dex_pool, \
+ "Provide the raw data of a given field in the Dex pool as a pychrysalide.StructObject" \
+ " instance." \
+ "\n" \
+ "Indexes start at 0.\n" \
+ "\n" \
+ "All the fields are extracted from the Dex *field_id_item* structure:\n" \
+ "* class_idx: index into the type_ids list for the definer of the field ;\n" \
+ "* type_idx: index into the type_ids list for the type of the field ;\n" \
+ "* name_idx: index into the string_ids list for the name of the field.\n" \
+ "\n" \
+ "In case of error, the function returns None." \
)
ret = PyArg_ParseTuple(args, "I", &index);
@@ -218,21 +218,21 @@ static PyObject *py_dex_pool_get_raw_prototype(PyObject *self, PyObject *args)
proto_id_item proto_id; /* Elément à transmettre */
bool status; /* Bilan de l'opération */
-#define DEX_POOL_GET_RAW_PROTOTYPE_METHOD PYTHON_METHOD_DEF \
-( \
- get_raw_prototype, "$self, index, /", \
- METH_VARARGS, py_dex_pool, \
- "Provide the raw data of a given prototype in the Dex pool as a pychrysalide.PyStructObject" \
- " instance." \
- "\n" \
- "Indexes start at 0.\n" \
- "\n" \
- "All the fields are extracted from the Dex *proto_id_item* structure:\n" \
- "* shorty_idx: index into the *string_ids* list for the short-form descriptor string ;\n" \
- "* return_type_idx: index into the *type_ids* list for the return type ;\n" \
- "* parameters_off: offset from the start of the Dex file to the list of parameter types." \
- "\n" \
- "In case of error, the function returns None." \
+#define DEX_POOL_GET_RAW_PROTOTYPE_METHOD PYTHON_METHOD_DEF \
+( \
+ get_raw_prototype, "$self, index, /", \
+ METH_VARARGS, py_dex_pool, \
+ "Provide the raw data of a given prototype in the Dex pool as a pychrysalide.StructObject" \
+ " instance." \
+ "\n" \
+ "Indexes start at 0.\n" \
+ "\n" \
+ "All the fields are extracted from the Dex *proto_id_item* structure:\n" \
+ "* shorty_idx: index into the *string_ids* list for the short-form descriptor string ;\n" \
+ "* return_type_idx: index into the *type_ids* list for the return type ;\n" \
+ "* parameters_off: offset from the start of the Dex file to the list of parameter types." \
+ "\n" \
+ "In case of error, the function returns None." \
)
ret = PyArg_ParseTuple(args, "I", &index);
@@ -278,21 +278,21 @@ static PyObject *py_dex_pool_get_raw_method(PyObject *self, PyObject *args)
method_id_item method_id; /* Elément à transmettre */
bool status; /* Bilan de l'opération */
-#define DEX_POOL_GET_RAW_METHOD_METHOD PYTHON_METHOD_DEF \
-( \
- get_raw_method, "$self, index, /", \
- METH_VARARGS, py_dex_pool, \
- "Provide the raw data of a given method in the Dex pool as a pychrysalide.PyStructObject" \
- " instance." \
- "\n" \
- "Indexes start at 0.\n" \
- "\n" \
- "All the fields are extracted from the Dex *method_id_item* structure:\n" \
- "* class_idx: index into the type_ids list for the definer of the method ;\n" \
- "* proto_idx: index into the proto_ids list for the prototype of the method ;\n" \
- "* name_idx: index into the string_ids list for the name of the method.\n" \
- "\n" \
- "In case of error, the function returns None." \
+#define DEX_POOL_GET_RAW_METHOD_METHOD PYTHON_METHOD_DEF \
+( \
+ get_raw_method, "$self, index, /", \
+ METH_VARARGS, py_dex_pool, \
+ "Provide the raw data of a given method in the Dex pool as a pychrysalide.StructObject" \
+ " instance." \
+ "\n" \
+ "Indexes start at 0.\n" \
+ "\n" \
+ "All the fields are extracted from the Dex *method_id_item* structure:\n" \
+ "* class_idx: index into the type_ids list for the definer of the method ;\n" \
+ "* proto_idx: index into the proto_ids list for the prototype of the method ;\n" \
+ "* name_idx: index into the string_ids list for the name of the method.\n" \
+ "\n" \
+ "In case of error, the function returns None." \
)
ret = PyArg_ParseTuple(args, "I", &index);
@@ -342,7 +342,7 @@ static PyObject *py_dex_pool_get_raw_class(PyObject *self, PyObject *args)
( \
get_raw_class, "$self, index, /", \
METH_VARARGS, py_dex_pool, \
- "Provide the raw data of a given class in the Dex pool as a pychrysalide.PyStructObject" \
+ "Provide the raw data of a given class in the Dex pool as a pychrysalide.StructObject" \
" instance." \
"\n" \
"Indexes start at 0.\n" \
diff --git a/plugins/elf/python/dynamic.h b/plugins/elf/python/dynamic.h
index 691eb83..b2b75b3 100644
--- a/plugins/elf/python/dynamic.h
+++ b/plugins/elf/python/dynamic.h
@@ -39,7 +39,7 @@ PyObject *py_elf_format_find_dynamic_item_by_index(PyObject *, PyObject *);
METH_VARARGS, py_elf_format, \
"Find an item from the dynamic item using a given index." \
"\n" \
- "The result is an instance of type pychrysalide.PyStructObject" \
+ "The result is an instance of type pychrysalide.StructObject" \
" on success, None otherwise." \
"\n" \
"The provided information about a found dynamic item is composed of" \
@@ -58,7 +58,7 @@ PyObject *py_elf_format_find_dynamic_item_by_type(PyObject *, PyObject *);
METH_VARARGS, py_elf_format, \
"Find an item from the dynamic item using a given type." \
"\n" \
- "The result is an instance of type pychrysalide.PyStructObject" \
+ "The result is an instance of type pychrysalide.StructObject" \
" on success, None otherwise." \
"\n" \
"The provided information about a found dynamic item is composed of" \
diff --git a/plugins/pychrysalide/analysis/db/client.c b/plugins/pychrysalide/analysis/db/client.c
index 68699b9..d5d8b48 100644
--- a/plugins/pychrysalide/analysis/db/client.c
+++ b/plugins/pychrysalide/analysis/db/client.c
@@ -656,17 +656,17 @@ static PyObject *py_hub_client_get_snapshots(PyObject *self, void *closure)
int ret; /* Bilan d'une mise en place */
bool failed; /* Détection d'une erreur */
-#define HUB_CLIENT_SNAPSHOTS_ATTRIB PYTHON_GET_DEF_FULL \
-( \
- snapshots, py_hub_client, \
- "List of all existing snapshots, provided as a tuple of pychrysalide.PyStructObject." \
- "\n" \
- "Each snapshot is characterised by the following properties :\n" \
- "* parent_id : identifier of the parent snapshot;\n" \
- "* id : identifier of the snapshot;\n" \
- "* created : timestamp of the creation date;\n" \
- "* name : name of the snapshot, or None;\n" \
- "* desc : description of the snapshot, or None." \
+#define HUB_CLIENT_SNAPSHOTS_ATTRIB PYTHON_GET_DEF_FULL \
+( \
+ snapshots, py_hub_client, \
+ "List of all existing snapshots, provided as a tuple of pychrysalide.StructObject." \
+ "\n" \
+ "Each snapshot is characterised by the following properties :\n" \
+ "* parent_id : identifier of the parent snapshot;\n" \
+ "* id : identifier of the snapshot;\n" \
+ "* created : timestamp of the creation date;\n" \
+ "* name : name of the snapshot, or None;\n" \
+ "* desc : description of the snapshot, or None." \
)
client = G_HUB_CLIENT(pygobject_get(self));
diff --git a/plugins/pychrysalide/struct.c b/plugins/pychrysalide/struct.c
index 2569fa2..28dbc51 100644
--- a/plugins/pychrysalide/struct.c
+++ b/plugins/pychrysalide/struct.c
@@ -30,17 +30,17 @@
-#define STRUCT_OBJ_DOC \
- "PyStructObject is a sugar glue used to transmit C structures to Python." \
- "\n" \
- "For instance, let's consider the following C structure :\n" \
- "\n" \
- " struct _my_struct_t { int a; int b } var;\n" \
- "\n" \
- "Such a structure will be translated into a Python dictionary.\n" \
- "\n" \
- "Each previous field gets then accessible using :\n" \
- "* a direct access: *var.a*;\n" \
+#define STRUCT_OBJ_DOC \
+ "StructObject is a sugar glue used to transmit C structures to Python." \
+ "\n" \
+ "For instance, let's consider the following C structure :\n" \
+ "\n" \
+ " struct _my_struct_t { int a; int b } var;\n" \
+ "\n" \
+ "Such a structure will be translated into a Python dictionary.\n" \
+ "\n" \
+ "Each previous field gets then accessible using :\n" \
+ "* a direct access: *var.a*;\n" \
"* an access by name thanks to the dictionary: *var['b']*."
@@ -126,7 +126,7 @@ PyTypeObject *get_python_py_struct_type(void)
PyVarObject_HEAD_INIT(NULL, 0)
- .tp_name = "pychrysalide.PyStructObject",
+ .tp_name = "pychrysalide.StructObject",
.tp_basicsize = sizeof(PyStructObject),
.tp_getattr = py_struct_getattr,
@@ -150,7 +150,7 @@ PyTypeObject *get_python_py_struct_type(void)
* *
* Paramètres : - *
* *
-* Description : Prend en charge l'objet 'pychrysalide.PyStructObject'. *
+* Description : Prend en charge l'objet 'pychrysalide.StructObject'. *
* *
* Retour : Bilan de l'opération. *
* *
@@ -160,7 +160,7 @@ PyTypeObject *get_python_py_struct_type(void)
bool ensure_python_py_struct_is_registered(void)
{
- PyTypeObject *type; /* Type Python 'PyStructObject'*/
+ PyTypeObject *type; /* Type Python 'StructObject' */
PyObject *module; /* Module à recompléter */
type = get_python_py_struct_type();
diff --git a/plugins/pychrysalide/struct.h b/plugins/pychrysalide/struct.h
index bdddce4..dfe036e 100644
--- a/plugins/pychrysalide/struct.h
+++ b/plugins/pychrysalide/struct.h
@@ -34,7 +34,7 @@
/* Fournit un accès à une définition de type à diffuser. */
PyTypeObject *get_python_py_struct_type(void);
-/* Prend en charge l'objet 'pychrysalide.PyStructObject'. */
+/* Prend en charge l'objet 'pychrysalide.StructObject'. */
bool ensure_python_py_struct_is_registered(void);