diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2013-04-26 10:08:29 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2013-04-26 10:08:29 -0300 |
commit | a2f5c28a802ae99f2045ab96585fade2c65b2037 (patch) | |
tree | eb2ab3d1fc8dc2084505ed4286502ed75b6721ba /ltests.c | |
parent | a80a2b5e561b50c1f64e96c3692614611a325aba (diff) | |
download | lua-a2f5c28a802ae99f2045ab96585fade2c65b2037.tar.gz lua-a2f5c28a802ae99f2045ab96585fade2c65b2037.tar.bz2 lua-a2f5c28a802ae99f2045ab96585fade2c65b2037.zip |
new operation '//' (integer division)
Diffstat (limited to 'ltests.c')
-rw-r--r-- | ltests.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: ltests.c,v 2.135 2013/03/16 21:10:18 roberto Exp roberto $ | 2 | ** $Id: ltests.c,v 2.136 2013/04/24 19:41:48 roberto Exp roberto $ |
3 | ** Internal Module for Debugging of the Lua Implementation | 3 | ** Internal Module for Debugging of the Lua Implementation |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -1198,7 +1198,7 @@ static int runC (lua_State *L, lua_State *L1, const char *pc) { | |||
1198 | } | 1198 | } |
1199 | } | 1199 | } |
1200 | else if EQ("arith") { | 1200 | else if EQ("arith") { |
1201 | static char ops[] = "+-*/%^_"; | 1201 | static char ops[] = "+-*/\\%^_"; /* '\' -> '//'; '_' -> '..' */ |
1202 | int op; | 1202 | int op; |
1203 | skip(&pc); | 1203 | skip(&pc); |
1204 | op = strchr(ops, *pc++) - ops; | 1204 | op = strchr(ops, *pc++) - ops; |