diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1997-07-01 16:32:41 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1997-07-01 16:32:41 -0300 |
| commit | 7820a47184c0079677c5c430125f0541af05c8b6 (patch) | |
| tree | 10ffcef30c0fa0a172056529b90176133220159d /opcode.c | |
| parent | 88b185ada15b76d6bfe8bb5e2d38935cf32e618a (diff) | |
| download | lua-7820a47184c0079677c5c430125f0541af05c8b6.tar.gz lua-7820a47184c0079677c5c430125f0541af05c8b6.tar.bz2 lua-7820a47184c0079677c5c430125f0541af05c8b6.zip | |
LOCALE support
Diffstat (limited to 'opcode.c')
| -rw-r--r-- | opcode.c | 5 |
1 files changed, 3 insertions, 2 deletions
| @@ -3,13 +3,14 @@ | |||
| 3 | ** TecCGraf - PUC-Rio | 3 | ** TecCGraf - PUC-Rio |
| 4 | */ | 4 | */ |
| 5 | 5 | ||
| 6 | char *rcs_opcode="$Id: opcode.c,v 4.14 1997/06/23 18:27:53 roberto Exp roberto $"; | 6 | char *rcs_opcode="$Id: opcode.c,v 4.15 1997/06/26 21:40:57 roberto Exp roberto $"; |
| 7 | 7 | ||
| 8 | #include <setjmp.h> | 8 | #include <setjmp.h> |
| 9 | #include <stdio.h> | 9 | #include <stdio.h> |
| 10 | #include <string.h> | 10 | #include <string.h> |
| 11 | #include <stdlib.h> | 11 | #include <stdlib.h> |
| 12 | 12 | ||
| 13 | #include "lualoc.h" | ||
| 13 | #include "luadebug.h" | 14 | #include "luadebug.h" |
| 14 | #include "luamem.h" | 15 | #include "luamem.h" |
| 15 | #include "opcode.h" | 16 | #include "opcode.h" |
| @@ -1027,7 +1028,7 @@ static void comparison (lua_Type ttype_less, lua_Type ttype_equal, | |||
| 1027 | if (ttype(l) == LUA_T_NUMBER && ttype(r) == LUA_T_NUMBER) | 1028 | if (ttype(l) == LUA_T_NUMBER && ttype(r) == LUA_T_NUMBER) |
| 1028 | result = (nvalue(l) < nvalue(r)) ? -1 : (nvalue(l) == nvalue(r)) ? 0 : 1; | 1029 | result = (nvalue(l) < nvalue(r)) ? -1 : (nvalue(l) == nvalue(r)) ? 0 : 1; |
| 1029 | else if (ttype(l) == LUA_T_STRING && ttype(r) == LUA_T_STRING) | 1030 | else if (ttype(l) == LUA_T_STRING && ttype(r) == LUA_T_STRING) |
| 1030 | result = strcmp(svalue(l), svalue(r)); | 1031 | result = strcoll(svalue(l), svalue(r)); |
| 1031 | else { | 1032 | else { |
| 1032 | call_binTM(op, "unexpected type at comparison"); | 1033 | call_binTM(op, "unexpected type at comparison"); |
| 1033 | return; | 1034 | return; |
