diff options
| author | ptitSeb <sebastien.chev@gmail.com> | 2024-12-20 11:04:13 +0100 |
|---|---|---|
| committer | ptitSeb <sebastien.chev@gmail.com> | 2024-12-20 11:04:28 +0100 |
| commit | e2ce483e0de62484f762e4e85b194fc4f228de44 (patch) | |
| tree | 67dcb0b27192a6fc0d403bd33ab5a3db06555658 /src/libtools/obstack.c | |
| parent | 41b31dc58d035e20b00fbc62977ec67277f2ef34 (diff) | |
| download | box64-e2ce483e0de62484f762e4e85b194fc4f228de44.tar.gz box64-e2ce483e0de62484f762e4e85b194fc4f228de44.zip | |
[BOX32][WRAPPER] Improved obstack handling
Diffstat (limited to 'src/libtools/obstack.c')
| -rw-r--r-- | src/libtools/obstack.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/libtools/obstack.c b/src/libtools/obstack.c index 3f923f8a..93d47fbf 100644 --- a/src/libtools/obstack.c +++ b/src/libtools/obstack.c @@ -224,7 +224,10 @@ EXPORT void my__obstack_newchunk(x64emu_t* emu, struct obstack* obstack, int s) #ifdef BOX32 EXPORT void my32__obstack_newchunk(x64emu_t* emu, struct obstack* obstack, int s) { - _obstack_newchunk(obstack, s); + struct obstack obstack_l = {0}; + convert_obstack_to_64(&obstack_l, obstack); + _obstack_newchunk(&obstack_l, s); + convert_obstack_to_32(obstack, &obstack_l); } #endif @@ -242,9 +245,12 @@ EXPORT int32_t my_obstack_vprintf(x64emu_t* emu, struct obstack* obstack, void* #ifdef BOX32 EXPORT int32_t my32_obstack_vprintf(x64emu_t* emu, struct obstack* obstack, void* fmt, void* b) { + struct obstack obstack_l = {0}; + convert_obstack_to_64(&obstack_l, obstack); myStackAlign32((const char*)fmt, b, emu->scratch); PREPARE_VALIST_32; - int r = obstack_vprintf(obstack, (const char*)fmt, VARARGS_32); + int r = obstack_vprintf(&obstack_l, (const char*)fmt, VARARGS_32); + convert_obstack_to_32(obstack, &obstack_l); return r; } #endif |