diff options
-rw-r--r-- | engines/glk/glk_types.h | 2 | ||||
-rw-r--r-- | engines/glk/glulxe/glkop.cpp | 4 | ||||
-rw-r--r-- | engines/glk/glulxe/glulxe.h | 8 | ||||
-rw-r--r-- | engines/glk/glulxe/string.cpp | 12 |
4 files changed, 13 insertions, 13 deletions
diff --git a/engines/glk/glk_types.h b/engines/glk/glk_types.h index 67a6eeff26..ef9c709354 100644 --- a/engines/glk/glk_types.h +++ b/engines/glk/glk_types.h @@ -231,7 +231,7 @@ union gluniversal_union { int8 _sch; ///< Cs char _ch; ///< Cn char *_charstr; ///< S - uint *_unicharstr; ///< U + uint32 *_unicharstr; ///< U void *_array; ///< all # arguments uint _ptrflag; ///< [ ... ] or *? }; diff --git a/engines/glk/glulxe/glkop.cpp b/engines/glk/glulxe/glkop.cpp index 22031cc878..d19bbd2088 100644 --- a/engines/glk/glulxe/glkop.cpp +++ b/engines/glk/glulxe/glkop.cpp @@ -1366,11 +1366,11 @@ void Glulxe::ReleaseVMString(char *ptr) { free_temp_string(ptr); } -uint *Glulxe::DecodeVMUstring(uint addr) { +uint32 *Glulxe::DecodeVMUstring(uint addr) { return make_temp_ustring(addr); } -void Glulxe::ReleaseVMUstring(uint *ptr) { +void Glulxe::ReleaseVMUstring(uint32 *ptr) { free_temp_ustring(ptr); } diff --git a/engines/glk/glulxe/glulxe.h b/engines/glk/glulxe/glulxe.h index 81095dc0b5..00d0be8fe9 100644 --- a/engines/glk/glulxe/glulxe.h +++ b/engines/glk/glulxe/glulxe.h @@ -326,8 +326,8 @@ protected: void WriteStructField(uint addr, uint fieldnum, uint val); char *DecodeVMString(uint addr); void ReleaseVMString(char *ptr); - uint *DecodeVMUstring(uint addr); - void ReleaseVMUstring(uint *ptr); + uint32 *DecodeVMUstring(uint addr); + void ReleaseVMUstring(uint32 *ptr); /**@}*/ @@ -993,9 +993,9 @@ public: void stream_get_iosys(uint *mode, uint *rock); void stream_set_iosys(uint mode, uint rock); char *make_temp_string(uint addr); - uint *make_temp_ustring(uint addr); + uint32 *make_temp_ustring(uint addr); void free_temp_string(char *str); - void free_temp_ustring(uint *str); + void free_temp_ustring(uint32 *str); /**@}*/ }; diff --git a/engines/glk/glulxe/string.cpp b/engines/glk/glulxe/string.cpp index a24a9b8b2f..12bd61b961 100644 --- a/engines/glk/glulxe/string.cpp +++ b/engines/glk/glulxe/string.cpp @@ -766,10 +766,10 @@ char *Glulxe::make_temp_string(uint addr) { return res; } -uint *Glulxe::make_temp_ustring(uint addr) { +uint32 *Glulxe::make_temp_ustring(uint addr) { int ix, len; uint addr2; - uint *res; + uint32 *res; if (Mem1(addr) != 0xE2) fatal_error("Ustring argument to a Glk call must be unencoded."); @@ -778,9 +778,9 @@ uint *Glulxe::make_temp_ustring(uint addr) { for (addr2 = addr; Mem4(addr2); addr2 += 4) { }; len = (addr2 - addr) / 4; if ((len + 1) * 4 < STATIC_TEMP_BUFSIZE) { - res = (uint *)temp_buf; + res = (uint32 *)temp_buf; } else { - res = (uint *)glulx_malloc((len + 1) * 4); + res = (uint32 *)glulx_malloc((len + 1) * 4); if (!res) fatal_error("Unable to allocate space for ustring argument to Glk call."); } @@ -798,8 +798,8 @@ void Glulxe::free_temp_string(char *str) { glulx_free(str); } -void Glulxe::free_temp_ustring(uint *str) { - if (str && str != (uint *)temp_buf) +void Glulxe::free_temp_ustring(uint32 *str) { + if (str && str != (uint32 *)temp_buf) glulx_free(str); } |