Fix build

This commit is contained in:
pancake 2012-08-26 11:07:09 +02:00
parent b3919e562c
commit e9829c5c9f
3 changed files with 8 additions and 8 deletions

View File

@ -139,12 +139,6 @@ static int r_bin_init_items(RBin *bin, int dummy) {
return R_TRUE; return R_TRUE;
} }
R_API void r_bin_class_free (RBinClass *c) {
free (c->name);
free (c->super);
free (c);
}
#define RBINLISTFREE(x) if(x){r_list_free(x);x=NULL;} #define RBINLISTFREE(x) if(x){r_list_free(x);x=NULL;}
static void r_bin_free_items(RBin *bin) { static void r_bin_free_items(RBin *bin) {
int i; int i;

View File

@ -145,6 +145,10 @@ static RList* methods (RBinArch *arch) {
return ret; return ret;
} }
static void __r_bin_class_free(RBinClass *p) {
r_bin_class_free (p);
}
static RList* classes (RBinArch *arch) { static RList* classes (RBinArch *arch) {
RBinClass *class; RBinClass *class;
RList *ret = NULL; RList *ret = NULL;
@ -154,7 +158,7 @@ static RList* classes (RBinArch *arch) {
if (!(ret = r_list_new ())) if (!(ret = r_list_new ()))
return NULL; return NULL;
ret->free = (RListFree)r_bin_class_free; ret->free = (RListFree)__r_bin_class_free;
for (i = 0; i < bin->header.class_size; i++) { for (i = 0; i < bin->header.class_size; i++) {
r_buf_read_at (bin->b, (ut64) bin->header.class_offset r_buf_read_at (bin->b, (ut64) bin->header.class_offset
+ (sizeof (struct dex_class_t)*i), (ut8*)&entry, + (sizeof (struct dex_class_t)*i), (ut8*)&entry,

View File

@ -237,9 +237,11 @@ typedef struct r_bin_bind_t {
} RBinBind; } RBinBind;
#ifdef R_API #ifdef R_API
#define r_bin_class_free(x) { free(x->name);free(x->super);free (x); }
R_API void r_bin_bind(RBin *b, RBinBind *bnd); R_API void r_bin_bind(RBin *b, RBinBind *bnd);
/* bin.c */ /* bin.c */
R_API void r_bin_class_free (RBinClass *c);
R_API int r_bin_add(RBin *bin, RBinPlugin *foo); R_API int r_bin_add(RBin *bin, RBinPlugin *foo);
R_API int r_bin_xtr_add(RBin *bin, RBinXtrPlugin *foo); R_API int r_bin_xtr_add(RBin *bin, RBinXtrPlugin *foo);
R_API void* r_bin_free(RBin *bin); R_API void* r_bin_free(RBin *bin);