aboutsummaryrefslogtreecommitdiff
path: root/lbuffer.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>1998-03-06 13:54:42 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>1998-03-06 13:54:42 -0300
commit88a2023c3285c4514519158fba90e644fc6ffca3 (patch)
treeda6611257545c486ff856dd48d66d94e056f3d66 /lbuffer.c
parent5ef1989c4b05aff8362a7ea6ba62aad76d4a040d (diff)
downloadlua-88a2023c3285c4514519158fba90e644fc6ffca3.tar.gz
lua-88a2023c3285c4514519158fba90e644fc6ffca3.tar.bz2
lua-88a2023c3285c4514519158fba90e644fc6ffca3.zip
support for strings with '\0'
Diffstat (limited to 'lbuffer.c')
-rw-r--r--lbuffer.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/lbuffer.c b/lbuffer.c
index 04820736..d5aa8c98 100644
--- a/lbuffer.c
+++ b/lbuffer.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: $ 2** $Id: lbuffer.c,v 1.1 1997/12/23 19:24:36 roberto Exp roberto $
3** Auxiliar functions for building Lua libraries 3** Auxiliar functions for building Lua libraries
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -57,6 +57,10 @@ void luaL_addsize (int n)
57 L->Mbuffnext += n; 57 L->Mbuffnext += n;
58} 58}
59 59
60int luaL_getsize (void)
61{
62 return L->Mbuffnext-(L->Mbuffbase-L->Mbuffer);
63}
60 64
61int luaL_newbuffer (int size) 65int luaL_newbuffer (int size)
62{ 66{