aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>1994-11-17 14:41:42 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>1994-11-17 14:41:42 -0200
commit5406d391cd8c51d56b92e5c390afd60f4c006922 (patch)
treede38cf1837a5313f412f82b2e5561c757a1d5946
parentb234da1cc2053b8919a9b27af67291e48fdf9703 (diff)
downloadlua-5406d391cd8c51d56b92e5c390afd60f4c006922.tar.gz
lua-5406d391cd8c51d56b92e5c390afd60f4c006922.tar.bz2
lua-5406d391cd8c51d56b92e5c390afd60f4c006922.zip
new API functions startblock and endblock
-rw-r--r--lua.h5
-rw-r--r--opcode.c19
2 files changed, 22 insertions, 2 deletions
diff --git a/lua.h b/lua.h
index 3affdb53..b4780ffe 100644
--- a/lua.h
+++ b/lua.h
@@ -2,7 +2,7 @@
2** LUA - Linguagem para Usuarios de Aplicacao 2** LUA - Linguagem para Usuarios de Aplicacao
3** Grupo de Tecnologia em Computacao Grafica 3** Grupo de Tecnologia em Computacao Grafica
4** TeCGraf - PUC-Rio 4** TeCGraf - PUC-Rio
5** $Id: lua.h,v 3.6 1994/11/09 18:10:11 roberto Exp roberto $ 5** $Id: lua.h,v 3.7 1994/11/13 16:17:04 roberto Exp $
6*/ 6*/
7 7
8 8
@@ -37,6 +37,9 @@ int lua_dostring (char *string);
37int lua_callfunction (lua_Object function); 37int lua_callfunction (lua_Object function);
38int lua_call (char *funcname); 38int lua_call (char *funcname);
39 39
40int lua_beginblock (void);
41void lua_endblock (int block);
42
40lua_Object lua_getparam (int number); 43lua_Object lua_getparam (int number);
41#define lua_getresult(_) lua_getparam(_) 44#define lua_getresult(_) lua_getparam(_)
42 45
diff --git a/opcode.c b/opcode.c
index 1451894e..11816826 100644
--- a/opcode.c
+++ b/opcode.c
@@ -3,7 +3,7 @@
3** TecCGraf - PUC-Rio 3** TecCGraf - PUC-Rio
4*/ 4*/
5 5
6char *rcs_opcode="$Id: opcode.c,v 3.13 1994/11/16 17:38:08 roberto Exp $"; 6char *rcs_opcode="$Id: opcode.c,v 3.14 1994/11/17 13:58:57 roberto Exp roberto $";
7 7
8#include <setjmp.h> 8#include <setjmp.h>
9#include <stdio.h> 9#include <stdio.h>
@@ -436,6 +436,23 @@ lua_Object lua_getsubscript (void)
436 return 0; 436 return 0;
437} 437}
438 438
439/*
440** API: starts a new block
441*/
442int lua_beginblock (void)
443{
444 return CBase;
445}
446
447/*
448** API: ends a block
449*/
450void lua_endblock (int block)
451{
452 CBase = block;
453 adjustC(0);
454}
455
439/* 456/*
440** API: receives on the stack the table, the index, and the new value. 457** API: receives on the stack the table, the index, and the new value.
441*/ 458*/