aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2010-03-22 14:28:31 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2010-03-22 14:28:31 -0300
commit28b2566c971ca407cff22126990684fa4da03298 (patch)
treebaa67a59dc65e4f0eb192947bd841e342e8fb0c5
parentcaf74dd7314761f8e1bd512dde19db7705eccd0a (diff)
downloadlua-28b2566c971ca407cff22126990684fa4da03298.tar.gz
lua-28b2566c971ca407cff22126990684fa4da03298.tar.bz2
lua-28b2566c971ca407cff22126990684fa4da03298.zip
'lua_assert' not visible from libraries
-rw-r--r--lauxlib.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/lauxlib.c b/lauxlib.c
index 81fdc18d..2efbbf74 100644
--- a/lauxlib.c
+++ b/lauxlib.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lauxlib.c,v 1.203 2010/03/17 21:37:37 roberto Exp roberto $ 2** $Id: lauxlib.c,v 1.204 2010/03/19 21:04:17 roberto Exp roberto $
3** Auxiliary functions for building Lua libraries 3** Auxiliary functions for building Lua libraries
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -397,8 +397,7 @@ LUALIB_API void luaL_addlstring (luaL_Buffer *B, const char *s, size_t l) {
397 size_t space = bufffree(B); 397 size_t space = bufffree(B);
398 if (space == 0) { 398 if (space == 0) {
399 luaL_prepbuffer(B); 399 luaL_prepbuffer(B);
400 lua_assert(bufffree(B) == LUAL_BUFFERSIZE); 400 space = LUAL_BUFFERSIZE; /* bufffree(B) == LUAL_BUFFERSIZE */
401 space = LUAL_BUFFERSIZE;
402 } 401 }
403 if (space > l) space = l; 402 if (space > l) space = l;
404 memcpy(B->p, s, space); 403 memcpy(B->p, s, space);