aboutsummaryrefslogtreecommitdiff
path: root/lstrlib.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2016-04-07 12:40:07 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2016-04-07 12:40:07 -0300
commitfff7d42a6963fc8edddd7349abe61f52e7d19e78 (patch)
treee8685411fe81e0664a4bfef7acf7479cfbb48ea2 /lstrlib.c
parent783aa8a9da5f32eb14b39d9332b41fa01ef81d52 (diff)
downloadlua-fff7d42a6963fc8edddd7349abe61f52e7d19e78.tar.gz
lua-fff7d42a6963fc8edddd7349abe61f52e7d19e78.tar.bz2
lua-fff7d42a6963fc8edddd7349abe61f52e7d19e78.zip
LUA_PACKPADBYTE -> LUAL_PACKPADBYTE (it is an internal library
name, not something to be usually configured)
Diffstat (limited to 'lstrlib.c')
-rw-r--r--lstrlib.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/lstrlib.c b/lstrlib.c
index 7f9cd00c..7b387fcb 100644
--- a/lstrlib.c
+++ b/lstrlib.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lstrlib.c,v 1.242 2016/03/23 18:08:26 roberto Exp roberto $ 2** $Id: lstrlib.c,v 1.243 2016/03/31 19:07:42 roberto Exp roberto $
3** Standard library for string operations and pattern-matching 3** Standard library for string operations and pattern-matching
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -1069,8 +1069,8 @@ static int str_format (lua_State *L) {
1069 1069
1070 1070
1071/* value used for padding */ 1071/* value used for padding */
1072#if !defined(LUA_PACKPADBYTE) 1072#if !defined(LUAL_PACKPADBYTE)
1073#define LUA_PACKPADBYTE 0x00 1073#define LUAL_PACKPADBYTE 0x00
1074#endif 1074#endif
1075 1075
1076/* maximum size for the binary representation of an integer */ 1076/* maximum size for the binary representation of an integer */
@@ -1307,7 +1307,7 @@ static int str_pack (lua_State *L) {
1307 KOption opt = getdetails(&h, totalsize, &fmt, &size, &ntoalign); 1307 KOption opt = getdetails(&h, totalsize, &fmt, &size, &ntoalign);
1308 totalsize += ntoalign + size; 1308 totalsize += ntoalign + size;
1309 while (ntoalign-- > 0) 1309 while (ntoalign-- > 0)
1310 luaL_addchar(&b, LUA_PACKPADBYTE); /* fill alignment */ 1310 luaL_addchar(&b, LUAL_PACKPADBYTE); /* fill alignment */
1311 arg++; 1311 arg++;
1312 switch (opt) { 1312 switch (opt) {
1313 case Kint: { /* signed integers */ 1313 case Kint: { /* signed integers */
@@ -1347,7 +1347,7 @@ static int str_pack (lua_State *L) {
1347 else { /* string smaller than needed */ 1347 else { /* string smaller than needed */
1348 luaL_addlstring(&b, s, len); /* add it all */ 1348 luaL_addlstring(&b, s, len); /* add it all */
1349 while (len++ < (size_t)size) /* pad extra space */ 1349 while (len++ < (size_t)size) /* pad extra space */
1350 luaL_addchar(&b, LUA_PACKPADBYTE); 1350 luaL_addchar(&b, LUAL_PACKPADBYTE);
1351 } 1351 }
1352 break; 1352 break;
1353 } 1353 }
@@ -1371,7 +1371,7 @@ static int str_pack (lua_State *L) {
1371 totalsize += len + 1; 1371 totalsize += len + 1;
1372 break; 1372 break;
1373 } 1373 }
1374 case Kpadding: luaL_addchar(&b, LUA_PACKPADBYTE); /* FALLTHROUGH */ 1374 case Kpadding: luaL_addchar(&b, LUAL_PACKPADBYTE); /* FALLTHROUGH */
1375 case Kpaddalign: case Knop: 1375 case Kpaddalign: case Knop:
1376 arg--; /* undo increment */ 1376 arg--; /* undo increment */
1377 break; 1377 break;