summaryrefslogtreecommitdiff
path: root/plugins/dex/method.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/dex/method.c')
-rw-r--r--plugins/dex/method.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/plugins/dex/method.c b/plugins/dex/method.c
index 7f0d0f8..f35858e 100644
--- a/plugins/dex/method.c
+++ b/plugins/dex/method.c
@@ -193,6 +193,7 @@ static void g_dex_method_finalize(GDexMethod *method)
GDexMethod *g_dex_method_new_defined(GDexFormat *format, const encoded_method *seed, uleb128_t *last)
{
GDexMethod *result; /* Composant à retourner */
+ GDexPool *pool; /* Table de ressources */
vmpa2t addr; /* Tête de lecture générique */
code_item item; /* Corps de la méthode */
phys_t ins_offset; /* Position physique du code */
@@ -200,7 +201,11 @@ GDexMethod *g_dex_method_new_defined(GDexFormat *format, const encoded_method *s
*last += seed->method_idx_diff;
- result = get_method_from_dex_pool(format, *last);
+ pool = g_dex_format_get_pool(format);
+
+ result = g_dex_pool_get_method(pool, *last);
+
+ g_object_unref(G_OBJECT(pool));
if (result == NULL)
return NULL;
@@ -266,18 +271,21 @@ GDexMethod *g_dex_method_new_defined(GDexFormat *format, const encoded_method *s
GDexMethod *g_dex_method_new_callable(GDexFormat *format, const method_id_item *method_id)
{
GDexMethod *result; /* Composant à retourner */
+ GDexPool *pool; /* Table de ressources */
GDataType *ns; /* Espace d'appartenance */
const char *name; /* Nom de la routine finale */
GBinRoutine *routine; /* Routine représentée */
result = NULL;
- ns = get_type_from_dex_pool(format, method_id->class_idx);
+ pool = g_dex_format_get_pool(format);
- name = get_string_from_dex_pool(format, method_id->name_idx, NULL);
+ ns = g_dex_pool_get_type_(pool, method_id->class_idx);
+
+ name = g_dex_pool_get_string(pool, method_id->name_idx, NULL);
if (name == NULL) goto gdmne_exit;
- routine = get_prototype_from_dex_pool(format, method_id->proto_idx);
+ routine = g_dex_pool_get_prototype(pool, method_id->proto_idx);
if (routine == NULL) goto gdmne_exit;
if (ns != NULL)
@@ -293,6 +301,8 @@ GDexMethod *g_dex_method_new_callable(GDexFormat *format, const method_id_item *
gdmne_exit:
+ g_object_unref(G_OBJECT(pool));
+
return result;
}