mirror of
https://github.com/radareorg/radare2.git
synced 2025-02-14 19:08:04 +00:00
Rename wasm subection index member to sec_i ##bin
This commit is contained in:
parent
d3e9ca89cb
commit
f438cabef1
@ -497,7 +497,7 @@ static RBinWasmTypeEntry *parse_type_entry(RBuffer *b, ut64 bound, ut32 index) {
|
||||
if (!type) {
|
||||
return NULL;
|
||||
}
|
||||
type->index = index;
|
||||
type->sec_i = index;
|
||||
type->file_offset = r_buf_tell (b);
|
||||
if (!consume_u7_r (b, bound, &type->form)) {
|
||||
goto beach;
|
||||
@ -582,7 +582,7 @@ beach:
|
||||
static RBinWasmFunctionEntry *parse_function_entry(RBuffer *b, ut64 bound, ut32 index) {
|
||||
RBinWasmFunctionEntry *func = R_NEW0 (RBinWasmFunctionEntry);
|
||||
if (func && consume_u32_r (b, bound, &func->typeindex)) {
|
||||
func->index = index;
|
||||
func->sec_i = index;
|
||||
func->file_offset = r_buf_tell (b);
|
||||
return func;
|
||||
}
|
||||
@ -799,7 +799,7 @@ beach:
|
||||
static RBinWasmMemoryEntry *parse_memory_entry(RBuffer *b, ut64 bound, ut32 index) {
|
||||
RBinWasmMemoryEntry *ptr = R_NEW0 (RBinWasmMemoryEntry);
|
||||
if (ptr) {
|
||||
ptr->index = index;
|
||||
ptr->sec_i = index;
|
||||
ptr->file_offset = r_buf_tell (b);
|
||||
if (!consume_limits_r (b, bound, &ptr->limits)) {
|
||||
free (ptr);
|
||||
@ -812,8 +812,8 @@ static RBinWasmMemoryEntry *parse_memory_entry(RBuffer *b, ut64 bound, ut32 inde
|
||||
static RBinWasmTableEntry *parse_table_entry(RBuffer *b, ut64 bound, ut32 index) {
|
||||
RBinWasmTableEntry *table = R_NEW0 (RBinWasmTableEntry);
|
||||
if (table) {
|
||||
table->sec_i = index;
|
||||
table->file_offset = r_buf_tell (b);
|
||||
table->index = index;
|
||||
if (!consume_s7_r (b, bound, (st8 *)&table->element_type)) {
|
||||
goto beach;
|
||||
}
|
||||
@ -831,7 +831,7 @@ beach:
|
||||
static RBinWasmGlobalEntry *parse_global_entry(RBuffer *b, ut64 bound, ut32 index) {
|
||||
RBinWasmGlobalEntry *ptr = R_NEW0 (RBinWasmGlobalEntry);
|
||||
if (!ptr) {
|
||||
ptr->index = index;
|
||||
ptr->sec_i = index;
|
||||
ptr->file_offset = r_buf_tell (b);
|
||||
if (!consume_u7_r (b, bound, (ut8 *)&ptr->content_type)) {
|
||||
goto beach;
|
||||
|
@ -88,8 +88,8 @@ typedef struct r_bin_wasm_type_vector_t {
|
||||
} RBinWasmTypeVec;
|
||||
|
||||
typedef struct r_bin_wasm_type_t {
|
||||
ut32 sec_i;
|
||||
ut64 file_offset;
|
||||
ut32 index;
|
||||
ut8 form;
|
||||
RBinWasmTypeVec *args;
|
||||
RBinWasmTypeVec *rets;
|
||||
@ -127,26 +127,26 @@ typedef struct r_bin_wasm_import_t {
|
||||
} RBinWasmImportEntry;
|
||||
|
||||
typedef struct r_bin_wasm_function_t {
|
||||
ut32 sec_i;
|
||||
ut64 file_offset;
|
||||
ut32 index;
|
||||
ut32 typeindex;
|
||||
} RBinWasmFunctionEntry;
|
||||
|
||||
typedef struct r_bin_wasm_table_t {
|
||||
ut32 index;
|
||||
ut32 sec_i;
|
||||
ut64 file_offset;
|
||||
ut8 element_type; // only anyfunc
|
||||
struct r_bin_wasm_resizable_limits_t limits;
|
||||
} RBinWasmTableEntry;
|
||||
|
||||
typedef struct r_bin_wasm_memory_t {
|
||||
ut32 index;
|
||||
ut32 sec_i;
|
||||
ut64 file_offset;
|
||||
struct r_bin_wasm_resizable_limits_t limits;
|
||||
} RBinWasmMemoryEntry;
|
||||
|
||||
typedef struct r_bin_wasm_global_t {
|
||||
ut32 index;
|
||||
ut32 sec_i;
|
||||
ut64 file_offset;
|
||||
r_bin_wasm_value_type_t content_type;
|
||||
ut8 mutability; // 0 if immutable, 1 if mutable
|
||||
|
Loading…
x
Reference in New Issue
Block a user