aboutsummaryrefslogtreecommitdiff
path: root/manual.tex
diff options
context:
space:
mode:
Diffstat (limited to 'manual.tex')
-rw-r--r--manual.tex13
1 files changed, 3 insertions, 10 deletions
diff --git a/manual.tex b/manual.tex
index c83104f0..18065d0a 100644
--- a/manual.tex
+++ b/manual.tex
@@ -1,4 +1,4 @@
1% $Id: manual.tex,v 1.8 1996/02/09 17:21:27 roberto Exp roberto $ 1% $Id: manual.tex,v 1.9 1996/02/09 19:02:30 roberto Exp roberto $
2 2
3\documentstyle[A4,11pt,bnf]{article} 3\documentstyle[A4,11pt,bnf]{article}
4 4
@@ -32,7 +32,7 @@ Waldemar Celes Filho
32Departamento de Inform\'atica --- PUC-Rio 32Departamento de Inform\'atica --- PUC-Rio
33} 33}
34 34
35\date{\small \verb$Date: 1996/02/09 17:21:27 $} 35\date{\small \verb$Date: 1996/02/09 19:02:30 $}
36 36
37\maketitle 37\maketitle
38 38
@@ -836,13 +836,12 @@ otherwise, the function returns 0 (the null pointer).
836 836
837The reverse process, that is, passing a specific C value to Lua, 837The reverse process, that is, passing a specific C value to Lua,
838is done by using the following functions: 838is done by using the following functions:
839\Deffunc{lua_pushnumber}\Deffunc{lua_pushstring}\Deffunc{lua_pushliteral} 839\Deffunc{lua_pushnumber}\Deffunc{lua_pushstring}
840\Deffunc{lua_pushcfunction}\Deffunc{lua_pushusertag} 840\Deffunc{lua_pushcfunction}\Deffunc{lua_pushusertag}
841\Deffunc{lua_pushuserdata} 841\Deffunc{lua_pushuserdata}
842\begin{verbatim} 842\begin{verbatim}
843void lua_pushnumber (double n); 843void lua_pushnumber (double n);
844void lua_pushstring (char *s); 844void lua_pushstring (char *s);
845void lua_pushliteral (char *s);
846void lua_pushcfunction (lua_CFunction f); 845void lua_pushcfunction (lua_CFunction f);
847void lua_pushusertag (void *u, int tag); 846void lua_pushusertag (void *u, int tag);
848\end{verbatim} 847\end{verbatim}
@@ -855,12 +854,6 @@ convert it to a correspondent \verb'lua_Object',
855and leave the result on the top of the Lua stack, 854and leave the result on the top of the Lua stack,
856where it can be assigned to a Lua variable, 855where it can be assigned to a Lua variable,
857passed as paramenter to a Lua function, etc (see below). \label{pushing} 856passed as paramenter to a Lua function, etc (see below). \label{pushing}
858\verb'lua_pushliteral' is like \verb'lua_pushstring',
859but also puts the string in the Lua literal table and merges duplications.
860This avoids the string to be garbage collected,
861and therefore has a better overall performance.
862As a rule, when the string to be pushed is a literal,
863\verb'lua_pushliteral' should be used.
864 857
865User data can have different tags, 858User data can have different tags,
866whose semantics are defined by the host program. 859whose semantics are defined by the host program.