Revision 26553115 thunk.c
b/thunk.c | ||
---|---|---|
31 | 31 |
/* XXX: make it dynamic */ |
32 | 32 |
StructEntry struct_entries[MAX_STRUCTS]; |
33 | 33 |
|
34 |
static const argtype *thunk_type_next_ptr(const argtype *type_ptr); |
|
35 |
|
|
34 | 36 |
static inline const argtype *thunk_type_next(const argtype *type_ptr) |
35 | 37 |
{ |
36 | 38 |
int type; |
... | ... | |
47 | 49 |
case TYPE_PTRVOID: |
48 | 50 |
return type_ptr; |
49 | 51 |
case TYPE_PTR: |
50 |
return thunk_type_next(type_ptr); |
|
52 |
return thunk_type_next_ptr(type_ptr);
|
|
51 | 53 |
case TYPE_ARRAY: |
52 |
return thunk_type_next(type_ptr + 1); |
|
54 |
return thunk_type_next_ptr(type_ptr + 1);
|
|
53 | 55 |
case TYPE_STRUCT: |
54 | 56 |
return type_ptr + 1; |
55 | 57 |
default: |
... | ... | |
57 | 59 |
} |
58 | 60 |
} |
59 | 61 |
|
62 |
static const argtype *thunk_type_next_ptr(const argtype *type_ptr) |
|
63 |
{ |
|
64 |
return thunk_type_next(type_ptr); |
|
65 |
} |
|
66 |
|
|
60 | 67 |
void thunk_register_struct(int id, const char *name, const argtype *types) |
61 | 68 |
{ |
62 | 69 |
const argtype *type_ptr; |
... | ... | |
267 | 274 |
} |
268 | 275 |
return(x86_mask); |
269 | 276 |
} |
277 |
|
|
278 |
#ifndef NO_THUNK_TYPE_SIZE |
|
279 |
int thunk_type_size_array(const argtype *type_ptr, int is_host) |
|
280 |
{ |
|
281 |
return thunk_type_size(type_ptr, is_host); |
|
282 |
} |
|
283 |
|
|
284 |
int thunk_type_align_array(const argtype *type_ptr, int is_host) |
|
285 |
{ |
|
286 |
return thunk_type_align(type_ptr, is_host); |
|
287 |
} |
|
288 |
#endif /* ndef NO_THUNK_TYPE_SIZE */ |
Also available in: Unified diff