aboutsummaryrefslogtreecommitdiff
path: root/src/lua/luaconf.h
diff options
context:
space:
mode:
authorLi Jin <dragon-fly@qq.com>2021-04-16 17:25:39 +0800
committerLi Jin <dragon-fly@qq.com>2021-04-16 17:25:39 +0800
commitce9f6632635222b38ef0b37b4b1273da4a1877b4 (patch)
tree04d4d3ea81749989015434333d3db1add7b0195a /src/lua/luaconf.h
parent3355b7c475bc4a3bc8c4f2e8a2f504bb3ccb9395 (diff)
downloadyuescript-ce9f6632635222b38ef0b37b4b1273da4a1877b4.tar.gz
yuescript-ce9f6632635222b38ef0b37b4b1273da4a1877b4.tar.bz2
yuescript-ce9f6632635222b38ef0b37b4b1273da4a1877b4.zip
fix small issues, add web assembly support.
Diffstat (limited to 'src/lua/luaconf.h')
-rw-r--r--src/lua/luaconf.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/lua/luaconf.h b/src/lua/luaconf.h
index 38e14ed..e64d2ee 100644
--- a/src/lua/luaconf.h
+++ b/src/lua/luaconf.h
@@ -663,11 +663,13 @@
663 663
664/* 664/*
665** macros to improve jump prediction, used mostly for error handling 665** macros to improve jump prediction, used mostly for error handling
666** and debug facilities. 666** and debug facilities. (Some macros in the Lua API use these macros.
667** Define LUA_NOBUILTIN if you do not want '__builtin_expect' in your
668** code.)
667*/ 669*/
668#if !defined(luai_likely) 670#if !defined(luai_likely)
669 671
670#if defined(__GNUC__) 672#if defined(__GNUC__) && !defined(LUA_NOBUILTIN)
671#define luai_likely(x) (__builtin_expect(((x) != 0), 1)) 673#define luai_likely(x) (__builtin_expect(((x) != 0), 1))
672#define luai_unlikely(x) (__builtin_expect(((x) != 0), 0)) 674#define luai_unlikely(x) (__builtin_expect(((x) != 0), 0))
673#else 675#else