Mercurial > MadButterfly
comparison tools/mb_c_source.m4 @ 212:5f144bab5de1
We should reteurn the content of the offset instead of offset itself since the return type is mb_obj_t
author | wycc@wycc-desktop |
---|---|
date | Fri, 12 Dec 2008 09:10:05 +0800 |
parents | 3fadd2f2742e |
children | a0a3196b1a05 |
comparison
equal
deleted
inserted
replaced
211:41eab0a10651 | 212:5f144bab5de1 |
---|---|
360 int i; | 360 int i; |
361 | 361 |
362 for(i = 0; i < lsym->num_entries; i++) { | 362 for(i = 0; i < lsym->num_entries; i++) { |
363 if(strcmp(lsym->entries[i].sym, sym) != 0) | 363 if(strcmp(lsym->entries[i].sym, sym) != 0) |
364 continue; | 364 continue; |
365 return (mb_obj_t *)(((void *)lsym) + lsym->entries[i].offset); | 365 return (mb_obj_t *)*((int*)(((void *)lsym) + lsym->entries[i].offset)); |
366 } | 366 } |
367 return NULL; | 367 return NULL; |
368 } | 368 } |
369 #endif /* MB_LSYM_GET_OBJ_WITH_NAME */ | 369 #endif /* MB_LSYM_GET_OBJ_WITH_NAME */ |
370 | 370 |