aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/lua-lpeg/lptypes.h
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2019-05-24 16:28:17 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2019-05-24 16:29:02 +0100
commit92ec3e389a7d4b4f6898fa347c35b9256bfcb792 (patch)
treea1321b6ce583782d100c59a815288387c3e9ff67 /contrib/lua-lpeg/lptypes.h
parent4626766ee1cbe74b33f3194d8dda97880e8c5c2e (diff)
downloadrspamd-92ec3e389a7d4b4f6898fa347c35b9256bfcb792.tar.gz
rspamd-92ec3e389a7d4b4f6898fa347c35b9256bfcb792.zip
[Minor] Adopt lpeg for aarch64 and luajit
Issue: #2906
Diffstat (limited to 'contrib/lua-lpeg/lptypes.h')
-rw-r--r--contrib/lua-lpeg/lptypes.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/contrib/lua-lpeg/lptypes.h b/contrib/lua-lpeg/lptypes.h
index 78dff6220..7173d11d3 100644
--- a/contrib/lua-lpeg/lptypes.h
+++ b/contrib/lua-lpeg/lptypes.h
@@ -9,6 +9,8 @@
#define lptypes_h
+#include "config.h"
+
#if !defined(LPEG_DEBUG)
#define NDEBUG
#endif
@@ -149,6 +151,12 @@ typedef struct Charset {
#define testchar(st,c) (((int)(st)[((c) >> 3)] & (1 << ((c) & 7))))
+/* Special workaround for luajit */
+#if defined(WITH_LUAJIT) && !(defined(_X86_) || defined(__x86_64__) || defined(__i386__))
+# define LPEG_LUD_WORKAROUND 1
+#endif
+void * lpeg_allocate_mem_low(size_t sz);
+void lpeg_free_mem_low(void *p);
#endif