summaryrefslogtreecommitdiff
path: root/Lib/lua/lua.swg
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/lua/lua.swg')
-rw-r--r--Lib/lua/lua.swg3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/lua/lua.swg b/Lib/lua/lua.swg
index 12c635d77..4244435a5 100644
--- a/Lib/lua/lua.swg
+++ b/Lib/lua/lua.swg
@@ -18,8 +18,9 @@
* constants typemaps
* ----------------------------------------------------------------------------- */
// this basically adds to a table of constants
+/* Extra `(`...`)` here are to handle $value being e.g. `SizeOf< int,int >::size`. */
%typemap(consttab) int, unsigned int, short, unsigned short, long, unsigned long, unsigned char, signed char, bool, enum SWIGTYPE
- {SWIG_LUA_CONSTTAB_INT("$symname", $value)}
+ {SWIG_LUA_CONSTTAB_INT("$symname", ($value))}
%typemap(consttab) float, double
{SWIG_LUA_CONSTTAB_FLOAT("$symname", $value)}