diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1994-11-17 14:41:42 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1994-11-17 14:41:42 -0200 |
commit | 5406d391cd8c51d56b92e5c390afd60f4c006922 (patch) | |
tree | de38cf1837a5313f412f82b2e5561c757a1d5946 | |
parent | b234da1cc2053b8919a9b27af67291e48fdf9703 (diff) | |
download | lua-5406d391cd8c51d56b92e5c390afd60f4c006922.tar.gz lua-5406d391cd8c51d56b92e5c390afd60f4c006922.tar.bz2 lua-5406d391cd8c51d56b92e5c390afd60f4c006922.zip |
new API functions startblock and endblock
-rw-r--r-- | lua.h | 5 | ||||
-rw-r--r-- | opcode.c | 19 |
2 files changed, 22 insertions, 2 deletions
@@ -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); | |||
37 | int lua_callfunction (lua_Object function); | 37 | int lua_callfunction (lua_Object function); |
38 | int lua_call (char *funcname); | 38 | int lua_call (char *funcname); |
39 | 39 | ||
40 | int lua_beginblock (void); | ||
41 | void lua_endblock (int block); | ||
42 | |||
40 | lua_Object lua_getparam (int number); | 43 | lua_Object lua_getparam (int number); |
41 | #define lua_getresult(_) lua_getparam(_) | 44 | #define lua_getresult(_) lua_getparam(_) |
42 | 45 | ||
@@ -3,7 +3,7 @@ | |||
3 | ** TecCGraf - PUC-Rio | 3 | ** TecCGraf - PUC-Rio |
4 | */ | 4 | */ |
5 | 5 | ||
6 | char *rcs_opcode="$Id: opcode.c,v 3.13 1994/11/16 17:38:08 roberto Exp $"; | 6 | char *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 | */ | ||
442 | int lua_beginblock (void) | ||
443 | { | ||
444 | return CBase; | ||
445 | } | ||
446 | |||
447 | /* | ||
448 | ** API: ends a block | ||
449 | */ | ||
450 | void 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 | */ |