diff options
| author | Fabrice Desclaux <fabrice.desclaux@cea.fr> | 2019-11-02 22:24:23 +0100 |
|---|---|---|
| committer | Fabrice Desclaux <fabrice.desclaux@cea.fr> | 2019-11-12 15:10:44 +0100 |
| commit | 4dc802e3544e669cfea1d6be8a01ca2a2600dfef (patch) | |
| tree | 96a79b40469c1db9201ca46b210503d4dcf378c5 /test/os_dep/linux/stdlib.py | |
| parent | 83e54bd2de945a36ab5ccd4cc5b94817d7cb0112 (diff) | |
| download | focaccia-miasm-4dc802e3544e669cfea1d6be8a01ca2a2600dfef.tar.gz focaccia-miasm-4dc802e3544e669cfea1d6be8a01ca2a2600dfef.zip | |
Clear get_str_* API
get_str_ansi decoded strings using utf8 and was blindly used for pure windows function (LoadLibraryA) and for stdlib functions (printf, strlen, ...) even if strlen does not use utf8... New API is: get_win_str_a/get_win_str_w and set_win_str_a/set_win_str_w for windows (respectively codepage1252/windows utf16) .Those functions should only be used in windows strings manipulations, so there are taken out of the jitter. get_c_str/set_c_str: as those functions are "classic" in OSes, they are keeped in the jitter.
Diffstat (limited to 'test/os_dep/linux/stdlib.py')
| -rwxr-xr-x | test/os_dep/linux/stdlib.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/os_dep/linux/stdlib.py b/test/os_dep/linux/stdlib.py index ef890625..a0432e65 100755 --- a/test/os_dep/linux/stdlib.py +++ b/test/os_dep/linux/stdlib.py @@ -33,7 +33,7 @@ class TestLinuxStdlib(unittest.TestCase): jit.push_uint32_t(buf) jit.push_uint32_t(0) # ret_ad stdlib.xxx_sprintf(jit) - ret = jit.get_str_ansi(buf) + ret = jit.get_c_str(buf) self.assertEqual(ret, "'coucou' 1111") |