-
Notifications
You must be signed in to change notification settings - Fork 5
/
library.c
39 lines (35 loc) · 927 Bytes
/
library.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#include "library.h"
#include "stdlib.h"
int _frida_g_strlen(gchar* ptr){
return strlen(ptr);
}
gchar* _frida_g_error_get_message(GError *error){
return error->message;
}
int _frida_g_error_get_code(GError *error){
return error->code;
}
GHashTableIter* _frida_g_hash_table_iter_new(){
size_t psize=sizeof(GHashTableIter);
GHashTableIter* pdata=(GHashTableIter*)malloc(psize);
memset(pdata,0,psize);
return pdata;
}
void _frida_g_hash_table_iter_free(GHashTableIter* i){
free(i);
}
int g_strlen(gchar* ptr){
return _frida_g_strlen(ptr);
}
gchar* g_error_get_message(GError *error){
return _frida_g_error_get_message(error);
}
int g_error_get_code(GError *error){
return _frida_g_error_get_code(error);
}
GHashTableIter* g_hash_table_iter_new(){
return _frida_g_hash_table_iter_new();
}
void g_hash_table_iter_free(GHashTableIter* i){
_frida_g_hash_table_iter_free(i);
}