diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2024-11-24 10:23:10 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2024-11-24 10:23:10 (GMT) |
commit | f58a0e41b2c7266f5e6b521485a9d62246efbb6d (patch) | |
tree | c19e18b83f08930b0262387c02150c79dbda320d /plugins | |
parent | d7aa3b671b83640006e00e853a439937c0c34dc0 (diff) |
Rename the function used to find section range by name.
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/pe/format.c | 6 | ||||
-rw-r--r-- | plugins/pychrysalide/format/program.c | 44 |
2 files changed, 25 insertions, 25 deletions
diff --git a/plugins/pe/format.c b/plugins/pe/format.c index ab9106d..11bc116 100644 --- a/plugins/pe/format.c +++ b/plugins/pe/format.c @@ -76,7 +76,7 @@ static bool g_pe_format_get_main_address(GPeFormat *, vmpa2t *); static bool g_pe_format_refine_portions(GPeFormat *); /* Fournit l'emplacement d'une section donnée. */ -static bool g_pe_format_get_section_range_by_name(const GPeFormat *, const char *, mrange_t *); +static bool g_pe_format_find_section_range_by_name(const GPeFormat *, const char *, mrange_t *); @@ -170,7 +170,7 @@ static void g_pe_format_class_init(GPeFormatClass *klass) prgm = G_PROGRAM_FORMAT_CLASS(klass); prgm->get_endian = (program_get_endian_fc)g_pe_format_get_endianness; - prgm->get_range_by_name = (get_range_by_name_fc)g_pe_format_get_section_range_by_name; + prgm->find_range_by_name = (find_range_by_name_fc)g_pe_format_find_section_range_by_name; exe = G_EXECUTABLE_FORMAT_CLASS(klass); @@ -695,7 +695,7 @@ static SourceEndian g_pe_format_get_endianness(const GPeFormat *format) * * ******************************************************************************/ -static bool g_pe_format_get_section_range_by_name(const GPeFormat *format, const char *name, mrange_t *range) +static bool g_pe_format_find_section_range_by_name(const GPeFormat *format, const char *name, mrange_t *range) { bool result; /* Bilan à retourner */ uint16_t i; /* Boucle de parcours */ diff --git a/plugins/pychrysalide/format/program.c b/plugins/pychrysalide/format/program.c index 28c1540..01b9703 100644 --- a/plugins/pychrysalide/format/program.c +++ b/plugins/pychrysalide/format/program.c @@ -66,7 +66,7 @@ static int py_program_format_init(PyObject *, PyObject *, PyObject *); static SourceEndian py_program_format_get_endianness_wrapper(const GProgramFormat *); /* Fournit l'emplacement d'une section donnée. */ -static bool py_program_format_get_section_range_by_name_wrapper(const GProgramFormat *, const char *, mrange_t *); +static bool py_program_format_find_section_range_by_name_wrapper(const GProgramFormat *, const char *, mrange_t *); @@ -86,7 +86,7 @@ static PyObject *py_program_format_has_flag(PyObject *, PyObject *); /* Fournit l'emplacement d'une section donnée. */ -static PyObject *py_program_format_get_section_range_by_name(PyObject *, PyObject *); +static PyObject *py_program_format_find_section_range_by_name(PyObject *, PyObject *); #if 0 @@ -154,7 +154,7 @@ static PyObject *py_program_format_get_errors(PyObject *, void *); static void py_program_format_init_gclass(GProgramFormatClass *class, gpointer unused) { class->get_endian = py_program_format_get_endianness_wrapper; - class->get_range_by_name = py_program_format_get_section_range_by_name_wrapper; + class->find_range_by_name = py_program_format_find_section_range_by_name_wrapper; } @@ -188,7 +188,7 @@ static int py_program_format_init(PyObject *self, PyObject *args, PyObject *kwds "* pychrysalide.format.ProgramFormat._get_endianness().\n" \ "\n" \ "Other optional method may be defined for new classes:\n" \ - "* pychrysalide.format.ProgramFormat._get_section_range_by_name().\n" \ + "* pychrysalide.format.ProgramFormat._find_section_range_by_name().\n" \ "\n" \ "Calls to the *__init__* constructor of this abstract object expect" \ " only one argument: a binary content, provided as a" \ @@ -295,7 +295,7 @@ static SourceEndian py_program_format_get_endianness_wrapper(const GProgramForma * * ******************************************************************************/ -static bool py_program_format_get_section_range_by_name_wrapper(const GProgramFormat *format, const char *name, mrange_t *range) +static bool py_program_format_find_section_range_by_name_wrapper(const GProgramFormat *format, const char *name, mrange_t *range) { bool result; /* Bilan à retourner */ PyGILState_STATE gstate; /* Sauvegarde d'environnement */ @@ -303,15 +303,15 @@ static bool py_program_format_get_section_range_by_name_wrapper(const GProgramFo PyObject *pyret; /* Valeur retournée */ int ret; /* Bilan d'une conversion */ -#define PROGRAM_FORMAT_GET_SECTION_RANGE_BY_NAME_WRAPPER PYTHON_WRAPPER_DEF \ -( \ - _get_section_range_by_name_wrapper, "$self, name", \ - METH_VARARGS, \ - "Abstract method used to compute the area of a section identified by" \ - " its name.\n" \ - "\n" \ - "The expected returned value is a pychrysalide.arch.mrange instance or" \ - " *None* in case of failure." \ +#define PROGRAM_FORMAT_FIND_SECTION_RANGE_BY_NAME_WRAPPER PYTHON_WRAPPER_DEF \ +( \ + _find_section_range_by_name_wrapper, "$self, name", \ + METH_VARARGS, \ + "Abstract method used to compute the area of a section identified by" \ + " its name.\n" \ + "\n" \ + "The expected returned value is a pychrysalide.arch.mrange instance or" \ + " *None* in case of failure." \ ) result = false; @@ -320,9 +320,9 @@ static bool py_program_format_get_section_range_by_name_wrapper(const GProgramFo pyobj = pygobject_new(G_OBJECT(format)); - if (has_python_method(pyobj, "_get_section_range_by_name")) + if (has_python_method(pyobj, "_find_section_range_by_name")) { - pyret = run_python_method(pyobj, "_get_section_range_by_name", NULL); + pyret = run_python_method(pyobj, "_find_section_range_by_name", NULL); if (pyret != NULL) { @@ -520,7 +520,7 @@ static PyObject *py_program_format_has_flag(PyObject *self, PyObject *args) * * ******************************************************************************/ -static PyObject *py_program_format_get_section_range_by_name(PyObject *self, PyObject *args) +static PyObject *py_program_format_find_section_range_by_name(PyObject *self, PyObject *args) { PyObject *result; /* Emplacement à retourner */ const char *name; /* Nom de section ciblée */ @@ -529,9 +529,9 @@ static PyObject *py_program_format_get_section_range_by_name(PyObject *self, PyO mrange_t range; /* Emplacement obtenu ? */ bool status; /* Bilan de l'opération */ -#define PROGRAM_FORMAT_GET_SECTION_RANGE_BY_NAME_METHOD PYTHON_METHOD_DEF \ +#define PROGRAM_FORMAT_FIND_SECTION_RANGE_BY_NAME_METHOD PYTHON_METHOD_DEF \ ( \ - get_section_range_by_name, "$self, name, /", \ + find_section_range_by_name, "$self, name, /", \ METH_VARARGS, py_program_format, \ "Compute the area of a section identified by its name.\n" \ "\n" \ @@ -546,7 +546,7 @@ static PyObject *py_program_format_get_section_range_by_name(PyObject *self, PyO format = G_PROGRAM_FORMAT(pygobject_get(self)); - status = g_program_format_get_section_range_by_name(format, name, &range); + status = g_program_format_find_section_range_by_name(format, name, &range); if (status) result = build_from_internal_mrange(&range); @@ -1194,8 +1194,8 @@ PyTypeObject *get_python_program_format_type(void) { static PyMethodDef py_program_format_methods[] = { PROGRAM_FORMAT_GET_ENDIANNESS_WRAPPER, - PROGRAM_FORMAT_GET_SECTION_RANGE_BY_NAME_WRAPPER, - PROGRAM_FORMAT_GET_SECTION_RANGE_BY_NAME_METHOD, + PROGRAM_FORMAT_FIND_SECTION_RANGE_BY_NAME_WRAPPER, + PROGRAM_FORMAT_FIND_SECTION_RANGE_BY_NAME_METHOD, /* PROGRAM_FORMAT_SET_FLAG_METHOD, PROGRAM_FORMAT_UNSET_FLAG_METHOD, |