aboutsummaryrefslogtreecommitdiff
path: root/lutf8lib.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2014-03-20 16:36:02 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2014-03-20 16:36:02 -0300
commit738b3b64afd6b06d1de6d71caae9a3122c74a5a5 (patch)
tree88cddae024fdaec52437ac8ad580ae2be8506c7b /lutf8lib.c
parent363b525c23126c167e89c688e835c54ab7ef30d1 (diff)
downloadlua-738b3b64afd6b06d1de6d71caae9a3122c74a5a5.tar.gz
lua-738b3b64afd6b06d1de6d71caae9a3122c74a5a5.tar.bz2
lua-738b3b64afd6b06d1de6d71caae9a3122c74a5a5.zip
detail (to avoid warnings with '-O3')
Diffstat (limited to 'lutf8lib.c')
-rw-r--r--lutf8lib.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lutf8lib.c b/lutf8lib.c
index bc3c7158..def7e869 100644
--- a/lutf8lib.c
+++ b/lutf8lib.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lutf8lib.c,v 1.2 2014/02/06 20:03:24 roberto Exp roberto $ 2** $Id: lutf8lib.c,v 1.3 2014/03/20 14:11:00 roberto Exp roberto $
3** Standard library for UTF-8 manipulation 3** Standard library for UTF-8 manipulation
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -108,7 +108,7 @@ static int codepoint (lua_State *L) {
108 int code; 108 int code;
109 s = utf8_decode(s, &code); 109 s = utf8_decode(s, &code);
110 if (s == NULL) 110 if (s == NULL)
111 luaL_error(L, "invalid UTF-8 code"); 111 return luaL_error(L, "invalid UTF-8 code");
112 lua_pushinteger(L, code); 112 lua_pushinteger(L, code);
113 n++; 113 n++;
114 } 114 }
@@ -200,7 +200,7 @@ static int iter_aux (lua_State *L) {
200 int code; 200 int code;
201 const char *next = utf8_decode(s + n, &code); 201 const char *next = utf8_decode(s + n, &code);
202 if (next == NULL || iscont(next)) 202 if (next == NULL || iscont(next))
203 luaL_error(L, "invalid UTF-8 code"); 203 return luaL_error(L, "invalid UTF-8 code");
204 lua_pushinteger(L, n + 1); 204 lua_pushinteger(L, n + 1);
205 lua_pushinteger(L, code); 205 lua_pushinteger(L, code);
206 return 2; 206 return 2;