diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2020-03-15 20:04:26 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2020-03-15 20:04:26 (GMT) |
commit | 8cfbcf2db62a65766e02618840c6296ba7d083d0 (patch) | |
tree | ab7f930a8c16f839ca46f8c88da61d8bb2b16de0 /plugins/elf/python/dynamic.h | |
parent | 46cf7042cf511215001bb28c072821998a83d011 (diff) |
Improved the Python API for ELF dynamic items.
Diffstat (limited to 'plugins/elf/python/dynamic.h')
-rw-r--r-- | plugins/elf/python/dynamic.h | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/plugins/elf/python/dynamic.h b/plugins/elf/python/dynamic.h index ca76c65..691eb83 100644 --- a/plugins/elf/python/dynamic.h +++ b/plugins/elf/python/dynamic.h @@ -33,12 +33,53 @@ /* Retrouve un élément dans la section dynamique par son indice. */ PyObject *py_elf_format_find_dynamic_item_by_index(PyObject *, PyObject *); +#define ELF_FORMAT_FIND_DYNAMIC_ITEM_BY_INDEX_METHOD PYTHON_METHOD_DEF \ +( \ + find_dynamic_item_by_index, "$self, index, /", \ + 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" \ + " on success, None otherwise." \ + "\n" \ + "The provided information about a found dynamic item is composed of" \ + " the following properties :\n" \ + "* d_tag;\n" \ + "* d_un.d_val;\n" \ + "* d_un.d_ptr." \ +) + /* Retrouve un élément dans la section dynamique par son type. */ PyObject *py_elf_format_find_dynamic_item_by_type(PyObject *, PyObject *); +#define ELF_FORMAT_FIND_DYNAMIC_ITEM_BY_TYPE_METHOD PYTHON_METHOD_DEF \ +( \ + find_dynamic_item_by_type, "$self, type, /", \ + 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" \ + " on success, None otherwise." \ + "\n" \ + "The provided information about a found dynamic item is composed of" \ + " the following properties :\n" \ + "* d_tag;\n" \ + "* d_un.d_val;\n" \ + "* d_un.d_ptr." \ +) + /* Fournit la liste des objets partagés requis. */ PyObject *py_elf_format_get_needed(PyObject *, void *); +#define ELF_FORMAT_NEEDED_ATTRIB PYTHON_GET_DEF_FULL \ +( \ + needed, py_elf_format, \ + "Provide the list of requiered shared objects." \ + "\n" \ + "The result is a tuple of strings or an empty tuple if" \ + " no external library is required by the binary." \ +) + #endif /* _PLUGINS_ELF_PYTHON_DYNAMIC_H */ |