diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1998-03-06 13:54:42 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1998-03-06 13:54:42 -0300 |
| commit | 88a2023c3285c4514519158fba90e644fc6ffca3 (patch) | |
| tree | da6611257545c486ff856dd48d66d94e056f3d66 /lbuffer.c | |
| parent | 5ef1989c4b05aff8362a7ea6ba62aad76d4a040d (diff) | |
| download | lua-88a2023c3285c4514519158fba90e644fc6ffca3.tar.gz lua-88a2023c3285c4514519158fba90e644fc6ffca3.tar.bz2 lua-88a2023c3285c4514519158fba90e644fc6ffca3.zip | |
support for strings with '\0'
Diffstat (limited to 'lbuffer.c')
| -rw-r--r-- | lbuffer.c | 6 |
1 files changed, 5 insertions, 1 deletions
| @@ -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 | ||
| 60 | int luaL_getsize (void) | ||
| 61 | { | ||
| 62 | return L->Mbuffnext-(L->Mbuffbase-L->Mbuffer); | ||
| 63 | } | ||
| 60 | 64 | ||
| 61 | int luaL_newbuffer (int size) | 65 | int luaL_newbuffer (int size) |
| 62 | { | 66 | { |
