aboutsummaryrefslogtreecommitdiff
path: root/src/string.cpp
diff options
context:
space:
mode:
authorgingerBill <gingerBill@users.noreply.github.com>2021-10-31 19:19:48 +0000
committerGitHub <noreply@github.com>2021-10-31 19:19:48 +0000
commitb1de429d2cf5c2d1643acc73ec3ced22e57d6a07 (patch)
tree99d74a813fc16bbe3389f69cb0ca516744cbb561 /src/string.cpp
parent3de1719c172771c2cb5ed41725274e71906b7e0a (diff)
parent5f51337a01fa4a1e7a461604d564fa64601727cf (diff)
Merge pull request #1255 from odin-lang/wasi-wasm
`wasi_wasm32` support
Diffstat (limited to 'src/string.cpp')
-rw-r--r--src/string.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/string.cpp b/src/string.cpp
index ca53fb2fc..800378689 100644
--- a/src/string.cpp
+++ b/src/string.cpp
@@ -21,13 +21,14 @@ struct String {
};
// NOTE(bill): used for printf style arguments
#define LIT(x) ((int)(x).len), (x).text
-#define STR_LIT(c_str) {cast(u8 *)c_str, gb_size_of(c_str)-1}
#if defined(GB_COMPILER_MSVC) && _MSC_VER < 1700
- #define str_lit(c_str) make_string(cast(u8 *)c_str, gb_size_of(c_str)-1)
+ #define STR_LIT(c_str) make_string(cast(u8 *)c_str, gb_size_of(c_str)-1)
#else
- #define str_lit(c_str) String{cast(u8 *)c_str, gb_size_of(c_str)-1}
+ #define STR_LIT(c_str) String{cast(u8 *)c_str, gb_size_of(c_str)-1}
#endif
+#define str_lit(c_str) STR_LIT(c_str)
+
// NOTE(bill): String16 is only used for Windows due to its file directories
struct String16 {
wchar_t *text;