diff options
Diffstat (limited to 'plugins/dex/python/method.c')
| -rw-r--r-- | plugins/dex/python/method.c | 45 | 
1 files changed, 45 insertions, 0 deletions
diff --git a/plugins/dex/python/method.c b/plugins/dex/python/method.c index 5a06403..1bffbff 100644 --- a/plugins/dex/python/method.c +++ b/plugins/dex/python/method.c @@ -36,6 +36,9 @@ +/* Fournit les identifiants Dex concernant la méthode. */ +static PyObject *py_dex_method_get_id_item(PyObject *, void *); +  /* Fournit les indications Dex concernant la méthode. */  static PyObject *py_dex_method_get_encoded(PyObject *, void *); @@ -52,6 +55,47 @@ static PyObject *py_dex_method_get_routine(PyObject *, void *);  *  Paramètres  : self    = objet Python concerné par l'appel.                 *  *                closure = non utilisé ici.                                   *  *                                                                             * +*  Description : Fournit les identifiants Dex concernant la méthode.          * +*                                                                             * +*  Retour      : Données brutes issues du binaire chargé.                     * +*                                                                             * +*  Remarques   : -                                                            * +*                                                                             * +******************************************************************************/ + +static PyObject *py_dex_method_get_id_item(PyObject *self, void *closure) +{ +    PyObject *result;                       /* Valeur à retourner          */ +    GDexMethod *method;                     /* Version native              */ +    const method_id_item *id_item;          /* Elément à traiter           */ + +#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"         \ +    "\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."         \ +) + +    method = G_DEX_METHOD(pygobject_get(self)); + +    id_item = g_dex_method_get_dex_id_item(method); + +    result = translate_dex_method_id_to_python(id_item); + +    return result; + +} + + +/****************************************************************************** +*                                                                             * +*  Paramètres  : self    = objet Python concerné par l'appel.                 * +*                closure = non utilisé ici.                                   * +*                                                                             *  *  Description : Fournit les indications Dex concernant la méthode.           *  *                                                                             *  *  Retour      : Données brutes issues du binaire chargé.                     * @@ -165,6 +209,7 @@ PyTypeObject *get_python_dex_method_type(void)      };      static PyGetSetDef py_dex_method_getseters[] = { +        DEX_METHOD_ID_ITEM_ATTRIB,          {              "encoded", py_dex_method_get_encoded, NULL,              "Encoded information about the Dex method.", NULL  | 
