No coercion string->number in arithmetic with LUA_NOCVTS2N
diff --git a/lstrlib.c b/lstrlib.c
index 7f4a018..48acb8b 100644
--- a/lstrlib.c
+++ b/lstrlib.c
@@ -233,6 +233,17 @@
** =======================================================
*/
+#if defined(LUA_NOCVTS2N) /* { */
+
+/* no coercion from strings to numbers */
+
+static const luaL_Reg stringmetamethods[] = {
+ {"__index", NULL}, /* placeholder */
+ {NULL, NULL}
+};
+
+#else /* }{ */
+
static int tonum (lua_State *L, int arg) {
if (lua_type(L, arg) == LUA_TNUMBER) { /* already a number? */
lua_pushvalue(L, arg);
@@ -311,6 +322,8 @@
{NULL, NULL}
};
+#endif /* } */
+
/* }====================================================== */
/*