commit fa6490ff400b73b77b1f6279c649558c196da621 from: ligurio date: Fri Dec 09 07:27:27 2022 UTC Deploying to gh-pages from @ ligurio/luac-manual-pages@e55231768bea68f01aaf7eb3730002361d27a16f 🚀 commit - 54b1822c2293005d81b09aa286df0380b20cee6e commit + fa6490ff400b73b77b1f6279c649558c196da621 blob - a9024fe72a3a00c6203b1f4f9809399973cab123 (mode 644) blob + /dev/null --- index.html +++ /dev/null @@ -1,165 +0,0 @@ - - - - - Lua 5.1 C API - - -

Lua 5.1 C API

- - - - blob - e18ea316d4eb0a9edcd3a5c101115cd991b6341d blob + 1c8cd14c9d90ca50518a7a36906ef9278b1503d8 --- luaL_Buffer.3.html +++ luaL_Buffer.3.html @@ -2,6 +2,7 @@ + LUAL_BUFFER(3) @@ -14,53 +15,65 @@
-

-luaL_Buffer — -
type for a string buffer
-

-#include - <lauxlib.h> -
-typedef struct luaL_Buffer luaL_Buffer; -

-luaL_Buffer() type for a - string buffer. -
-A string buffer allows C code to build Lua strings piecemeal. Its pattern of use - is as follows: -
+
+

+

luaL_Buffertype + for a string buffer

+
+
+

+

#include + <lauxlib.h>

+

typedef struct luaL_Buffer luaL_Buffer;

+
+
+

+

() + type for a + .

+

A string buffer allows C code to build Lua strings piecemeal. Its + pattern of use is as follows:

+

  • First you declare a variable b of type - luaL_Buffer.
  • -
  • Then you initialize it with a call - luaL_buffinit(L, &b).
  • -
  • Then you add string pieces to the buffer calling any of the - luaL_add* functions.
  • -
  • You finish by calling - luaL_pushresult(&b). This call leaves the - final string on the top of the stack.
  • + luaL_Buffer. +
  • Then you initialize it with a call + .
  • +
  • Then you add string pieces to the buffer calling any of the + + functions.
  • +
  • You finish by calling + . + This call leaves the final string on the top of the stack.
-
-During its normal operation, a string buffer uses a variable number of stack - slots. So, while using a buffer, you cannot assume that you know where the top - of the stack is. You can use the stack between successive calls to buffer - operations as long as that use is balanced; that is, when you call a buffer - operation, the stack is at the same level it was immediately after the - previous buffer operation. (The only exception to this rule is - luaL_addvalue). After calling - luaL_pushresult(3) the stack is back to its level - when the buffer was initialized, plus the final string on its top. -

). + After calling luaL_pushresult(3) the stack is back to its + level when the buffer was initialized, plus the final string on its top.

+

+
+

-luaL_pushresult(3) -
-Roberto Ierusalimschy, - Luiz Henrique de Figueiredo, and - Waldemar Celes, Lua 5.1 Reference - Manual. -

-The luaL_Buffer() manual page was written by - Sergey Bronnikov.
+

luaL_pushresult(3)

+

Roberto Ierusalimschy, + Luiz Henrique de Figueiredo, and + Waldemar Celes, Lua 5.1 Reference + Manual.

+ +
+

+

The luaL_Buffer() manual page was written + by Sergey Bronnikov.

+
+ blob - 26fbb7429f9db1f8eaaec3ea58ccc6b28fe225c9 blob + 9f30ea997b60e09dec3991621590a671c3deb340 --- luaL_Reg.3.html +++ luaL_Reg.3.html @@ -2,6 +2,7 @@ + LUAL_REG(3) @@ -14,46 +15,50 @@
July 26, 2022
-

-luaL_Reg — -
type for arrays of functions to be registered by - luaL_register
-

-#include - <lauxlib.h> -
-typedef struct luaL_Reg; -

-luaL_Reg() type for arrays of functions to be - registered by luaL_register(3). - luaL_Reg is defined as: -
-
-
-typedef struct luaL_Reg { 
-        const char *name; 
-        lua_CFunction func; 
-} luaL_Reg;
-
+
+

+

luaL_Regtype + for arrays of functions to be registered by luaL_register

+
+
+

+

#include + <lauxlib.h>

+

typedef struct luaL_Reg;

+
+
+

+

() + type for arrays of functions to be registered by + luaL_register(3). luaL_Reg is + defined as:

+
+
typedef struct luaL_Reg {
+        const char *name;
+        lua_CFunction func;
+} luaL_Reg;
-
-name is the function name and - func is a pointer to the function. Any array - of luaL_Reg must end with an sentinel entry - in which both name and - func are - NULL. -

-luaL_register(3) -
-Roberto Ierusalimschy, - Luiz Henrique de Figueiredo, and - Waldemar Celes, Lua 5.1 Reference - Manual. -

-The luaL_Reg() manual page was written by - Sergey Bronnikov.
+

luaL_register(3)

+

Roberto Ierusalimschy, + Luiz Henrique de Figueiredo, and + Waldemar Celes, Lua 5.1 Reference + Manual.

+ +
+

+

The luaL_Reg() manual page was written by + Sergey Bronnikov.

+
+
blob - 92a70d50199aac305ad77f73334dc8883df815db blob + 549e5de3054c042c0c447dfd5ea5bc93debaca0c --- luaL_addchar.3.html +++ luaL_addchar.3.html @@ -2,6 +2,7 @@ + LUAL_ADDCHAR(3) @@ -14,34 +15,41 @@
July 26, 2022
-

-luaL_addchar — -
adds the character to the buffer
-

-#include - <lauxlib.h> -
-void -
-luaL_addchar(luaL_Buffer - *B, char - c); -

-luaL_addchar() adds the character - c to the buffer - B (see - luaL_Buffer(3)). -

+

luaL_addchar — + adds the character to the buffer

+
+
+

+

#include + <lauxlib.h>

+

void +
+ luaL_addchar(luaL_Buffer + *B, char c);

+
+
+

+

() + adds the character c to the buffer + B (see luaL_Buffer(3)).

+
+
+

-luaL_Buffer(3) -
-Roberto Ierusalimschy, - Luiz Henrique de Figueiredo, and - Waldemar Celes, Lua 5.1 Reference - Manual. -

-The luaL_addchar() manual page was written by - Sergey Bronnikov.

+

luaL_Buffer(3)

+

Roberto Ierusalimschy, + Luiz Henrique de Figueiredo, and + Waldemar Celes, Lua 5.1 Reference + Manual.

+ +
+

+

The luaL_addchar() manual page was written + by Sergey Bronnikov.

+
+ blob - ace5efe9e26b8e29cd325df89eafe36d4c989704 blob + 5ee681302d99febd19883606e1b076a440cb5af1 --- luaL_addlstring.3.html +++ luaL_addlstring.3.html @@ -2,6 +2,7 @@ + LUAL_ADDLSTRING(3) @@ -14,37 +15,44 @@
July 22, 2022
-

-luaL_addlstring — -
adds the string to the buffer
-

-#include - <lauxlib.h> -
-void -
-luaL_addlstring(luaL_Buffer - *B, const char - *s, size_t - l); -

-luaL_addlstring() adds the string pointed to - by s with length - l to the buffer - B (see - luaL_Buffer(3)). The string may contain embedded - zeros. -

+

luaL_addlstring — + adds the string to the buffer

+
+
+

+

#include + <lauxlib.h>

+

void +
+ luaL_addlstring(luaL_Buffer + *B, const char *s, + size_t l);

+
+
+

+

() + adds the string pointed to by s with length + l to the buffer B (see + luaL_Buffer(3)). The string may contain embedded + zeros.

+
+
+

-luaL_Buffer(3) -
-Roberto Ierusalimschy, - Luiz Henrique de Figueiredo, and - Waldemar Celes, Lua 5.1 Reference - Manual. -

-The luaL_addlstring() manual page was written - by Sergey Bronnikov.

+

luaL_Buffer(3)

+

Roberto Ierusalimschy, + Luiz Henrique de Figueiredo, and + Waldemar Celes, Lua 5.1 Reference + Manual.

+ +
+

+

The luaL_addlstring() manual page was + written by Sergey Bronnikov.

+
+ blob - 260f54fe6e3c95c414ba2012e6fb66ac1fe86440 blob + 20cf8be7088b29565b078f21b4ac79d4411cb3df --- luaL_addsize.3.html +++ luaL_addsize.3.html @@ -2,6 +2,7 @@ + LUAL_ADDSIZE(3) @@ -14,36 +15,44 @@
July 22, 2022
-

-luaL_addsize — -
adds to the buffer a string
-

-#include - <lauxlib.h> -
-void -
-luaL_addsize(luaL_Buffer - *B, size_t - n); -

-luaL_addsize() adds to the buffer - B (see - luaL_Buffer(3)) a string of length - n previously copied to the buffer area (see - luaL_prepbuffer(3)). -

+

luaL_addsize — + adds to the buffer a string

+
+
+

+

#include + <lauxlib.h>

+

void +
+ luaL_addsize(luaL_Buffer + *B, size_t n);

+
+
+

+

() + adds to the buffer B (see + luaL_Buffer(3)) a string of length n + previously copied to the buffer area (see + luaL_prepbuffer(3)).

+
+
+

-luaL_Buffer(3), - luaL_prepbuffer(3) -
-Roberto Ierusalimschy, - Luiz Henrique de Figueiredo, and - Waldemar Celes, Lua 5.1 Reference - Manual. -

-The luaL_addsize() manual page was written by - Sergey Bronnikov.

+

luaL_Buffer(3), + luaL_prepbuffer(3)

+

Roberto Ierusalimschy, + Luiz Henrique de Figueiredo, and + Waldemar Celes, Lua 5.1 Reference + Manual.

+ +
+

+

The luaL_addsize() manual page was written + by Sergey Bronnikov.

+
+ blob - 8c4316c77c14e3098dce868d8f6929b9854cf830 blob + 99f7492b71db6f1798bc29e9f18e43e360a0f1e8 --- luaL_addstring.3.html +++ luaL_addstring.3.html @@ -2,6 +2,7 @@ + LUAL_ADDSTRING(3) @@ -14,35 +15,43 @@
July 22, 2022
-

-luaL_addstring — -
adds the zero-terminated string to the buffer
-

-#include - <lauxlib.h> -
-void -
-luaL_addstring(luaL_Buffer - *B, const char - *s); -

-luaL_addstring() adds the zero-terminated - string pointed to by s to the buffer - B (see - luaL_Buffer(3)). The string may not contain - embedded zeros. -

+

luaL_addstring — + adds the zero-terminated string to the buffer

+
+
+

+

#include + <lauxlib.h>

+

void +
+ luaL_addstring(luaL_Buffer + *B, const char + *s);

+
+
+

+

() + adds the zero-terminated string pointed to by s to the + buffer B (see luaL_Buffer(3)). The + string may not contain embedded zeros.

+
+
+

-luaL_Buffer(3) -
-Roberto Ierusalimschy, - Luiz Henrique de Figueiredo, and - Waldemar Celes, Lua 5.1 Reference - Manual. -

-The luaL_addstring() manual page was written - by Sergey Bronnikov.

+

luaL_Buffer(3)

+

Roberto Ierusalimschy, + Luiz Henrique de Figueiredo, and + Waldemar Celes, Lua 5.1 Reference + Manual.

+ +
+

+

The luaL_addstring() manual page was + written by Sergey Bronnikov.

+
+ blob - a1bfcc42592daab1184b2853cb1ce126dce37957 blob + 24bcd41df36fb34080cf347cd7622155acaad3e9 --- luaL_addvalue.3.html +++ luaL_addvalue.3.html @@ -2,6 +2,7 @@ + LUAL_ADDVALUE(3) @@ -14,36 +15,45 @@
July 22, 2022
-

-luaL_addvalue — -
adds the value at the top of the stack to the - buffer
-

-#include - <lauxlib.h> -
-void -
-luaL_addvalue(luaL_Buffer - *B); -

-luaL_addvalue() adds the value at the top of - the stack to the buffer B (see - luaL_Buffer(3)). Pops the value. -
-This is the only function on string buffers that can (and must) be called with - an extra element on the stack, which is the value to be added to the buffer. -

+

luaL_addvalue — + adds the value at the top of the stack to the + buffer

+
+
+

+

#include + <lauxlib.h>

+

void +
+ luaL_addvalue(luaL_Buffer + *B);

+
+
+

+

() + adds the value at the top of the stack to the buffer B + (see luaL_Buffer(3)). Pops the value.

+

This is the only function on string buffers that can (and must) be + called with an extra element on the stack, which is the value to be added to + the buffer.

+
+
+

-luaL_Buffer(3) -
-Roberto Ierusalimschy, - Luiz Henrique de Figueiredo, and - Waldemar Celes, Lua 5.1 Reference - Manual. -

-The luaL_addvalue() manual page was written - by Sergey Bronnikov.

+

luaL_Buffer(3)

+

Roberto Ierusalimschy, + Luiz Henrique de Figueiredo, and + Waldemar Celes, Lua 5.1 Reference + Manual.

+ +
+

+

The luaL_addvalue() manual page was + written by Sergey Bronnikov.

+
+ blob - 2347a3aed45bbbff94839c844c2e9055f9dd5497 blob + 2f95d68403b4729b738e69771a4795d5f6a9aba1 --- luaL_argcheck.3.html +++ luaL_argcheck.3.html @@ -2,6 +2,7 @@ + LUAL_ARGCHECK(3) @@ -14,39 +15,47 @@
July 22, 2022
-

-luaL_argcheck — -
checks whether cond is true
-

-#include - <lauxlib.h> -
-void -
-luaL_argcheck(lua_State - *L, int - cond, int - narg, const char - *extramsg); -

-luaL_argcheck() checks whether cond is true. - If not, raises an error with the following message, where func is retrieved - from the call stack: -
-
-
-bad argument #<narg> to <func> (<extramsg>)
-
+
+

+

luaL_argcheck — + checks whether cond is true

+
+
+

+

#include + <lauxlib.h>

+

void +
+ luaL_argcheck(lua_State + *L, int cond, + int narg, + const char + *extramsg);

+
+
+

+

() + checks whether cond is true. If not, raises an error with the following + message, where func is retrieved from the call stack:

+

+
+
bad argument #<narg> to <func> (<extramsg>)
-

-Roberto Ierusalimschy, - Luiz Henrique de Figueiredo, and - Waldemar Celes, Lua 5.1 Reference - Manual. -

-The luaL_argcheck() manual page was written - by Sergey Bronnikov.
+

Roberto Ierusalimschy, + Luiz Henrique de Figueiredo, and + Waldemar Celes, Lua 5.1 Reference + Manual.

+ +
+

+

The luaL_argcheck() manual page was + written by Sergey Bronnikov.

+
+
blob - 5744a51e78b864756b0c9f105b3614b818867b43 blob + 6dcae8100e277dd7d406daa49780e0b91c7d2d7b --- luaL_argerror.3.html +++ luaL_argerror.3.html @@ -2,6 +2,7 @@ + LUAL_ARGERROR(3) @@ -14,40 +15,49 @@
July 24, 2022
-

-luaL_argerror — -
raises an error with the message
-

-#include - <lauxlib.h> -
-int -
-luaL_argerror(lua_State - *L, int - narg, const char - *extramsg); -

-luaL_argerror() raises an error with the - following message, where func is retrieved from the call stack: -
-
-
-bad argument #<narg> to <func> (<extramsg>)
-
+
+

+

luaL_argerror — + raises an error with the message

+
+
+

+

#include + <lauxlib.h>

+

int +
+ luaL_argerror(lua_State + *L, int narg, + const char + *extramsg);

+
+
+

+

() + raises an error with the following message, where func is retrieved from the + call stack:

+

+
+
bad argument #<narg> to <func> (<extramsg>)
-
-This function never returns, but it is an idiom to use it in C functions as - return luaL_argerror(args). -

.

+

+
+

-Roberto Ierusalimschy, - Luiz Henrique de Figueiredo, and - Waldemar Celes, Lua 5.1 Reference - Manual. -

-The luaL_argerror() manual page was written - by Sergey Bronnikov.
+

Roberto Ierusalimschy, + Luiz Henrique de Figueiredo, and + Waldemar Celes, Lua 5.1 Reference + Manual.

+ +
+

+

The luaL_argerror() manual page was + written by Sergey Bronnikov.

+
+
blob - 5aaf75494a9fd174d5c4ba3897673a17cc97adb9 blob + 4d4d71040363492b525fbe9754933686a83c855a --- luaL_buffinit.3.html +++ luaL_buffinit.3.html @@ -2,6 +2,7 @@ + LUAL_BUFFINIT(3) @@ -14,34 +15,43 @@
July 24, 2022
-

-luaL_buffinit — -
initializes a buffer
-

-#include - <lauxlib.h> -
-void -
-luaL_buffinit(lua_State - *L, luaL_Buffer - *B); -

-luaL_buffinit() initializes a buffer - B. This function does not allocate any space; - the buffer must be declared as a variable (see - luaL_Buffer(3)). -

+

luaL_buffinit — + initializes a buffer

+
+
+

+

#include + <lauxlib.h>

+

void +
+ luaL_buffinit(lua_State + *L, luaL_Buffer + *B);

+
+
+

+

() + initializes a buffer B. This function does not + allocate any space; the buffer must be declared as a variable (see + luaL_Buffer(3)).

+
+
+

-luaL_Buffer(3) -
-Roberto Ierusalimschy, - Luiz Henrique de Figueiredo, and - Waldemar Celes, Lua 5.1 Reference - Manual. -

-The luaL_buffinit() manual page was written - by Sergey Bronnikov.

+

luaL_Buffer(3)

+

Roberto Ierusalimschy, + Luiz Henrique de Figueiredo, and + Waldemar Celes, Lua 5.1 Reference + Manual.

+ +
+

+

The luaL_buffinit() manual page was + written by Sergey Bronnikov.

+
+ blob - ce565d4347ea287e665b0852285b9ada3809caa9 blob + 2ba3e11416f9b298ed95c2e71da6e2e590bd86c3 --- luaL_callmeta.3.html +++ luaL_callmeta.3.html @@ -2,6 +2,7 @@ + LUAL_CALLMETA(3) @@ -14,38 +15,50 @@
July 22, 2022
-

-luaL_callmeta — -
calls a metamethod
-

-#include - <lauxlib.h> -
-int -
-luaL_callmeta(lua_State - *L, int - obj, const char - *e); -

-luaL_callmeta() calls a metamethod. -

+

luaL_callmeta — + calls a metamethod

+
+
+

+

#include + <lauxlib.h>

+

int +
+ luaL_callmeta(lua_State + *L, int obj, + const char *e);

+
+
+

+

() + calls a metamethod.

+
+
+

-If the object at index obj has a metatable and this metatable has a field - e, this function calls this field and passes - the object as its only argument. In this case this function returns 1 and - pushes onto the stack the value returned by the call. If there is no metatable - or no metamethod, this function returns 0 (without pushing any value on the - stack). -

-Roberto Ierusalimschy, - Luiz Henrique de Figueiredo, and - Waldemar Celes, Lua 5.1 Reference - Manual. -

-The luaL_callmeta() manual page was written - by Sergey Bronnikov.

+

Roberto Ierusalimschy, + Luiz Henrique de Figueiredo, and + Waldemar Celes, Lua 5.1 Reference + Manual.

+ +
+

+

The luaL_callmeta() manual page was + written by Sergey Bronnikov.

+
+ blob - ec2f9306b7bd1e61d66dbcb0e87034c60a72af7c blob + 9ef077fd93a07286c43bd75c2e8907bfd6c480da --- luaL_checkany.3.html +++ luaL_checkany.3.html @@ -2,6 +2,7 @@ + LUAL_CHECKANY(3) @@ -14,32 +15,42 @@
July 26, 2022
-

-luaL_checkany — -
checks whether the function has an argument of any - type
-

-#include - <lauxlib.h> -
-void -
-luaL_checkany(lua_State - *L, int - narg); -

-luaL_checkany() checks whether the function - has an argument of any type (including nil) at - position narg. -

+

luaL_checkany — + checks whether the function has an argument of any + type

+
+
+

+

#include + <lauxlib.h>

+

void +
+ luaL_checkany(lua_State + *L, int narg);

+
+
+

+

() + checks whether the function has an argument of any type (including + ) at + position narg.

+
+
+

-Roberto Ierusalimschy, - Luiz Henrique de Figueiredo, and - Waldemar Celes, Lua 5.1 Reference - Manual. -

-The luaL_checkany() manual page was written - by Sergey Bronnikov.

+

Roberto Ierusalimschy, + Luiz Henrique de Figueiredo, and + Waldemar Celes, Lua 5.1 Reference + Manual.

+ +
+

+

The luaL_checkany() manual page was + written by Sergey Bronnikov.

+
+ blob - 126e64b2d60c392053aaf62d933cf1f3208044b6 blob + 9a9314df8f73a4837c9575d1a23b1c9961353316 --- luaL_checkint.3.html +++ luaL_checkint.3.html @@ -2,6 +2,7 @@ + LUAL_CHECKINT(3) @@ -14,32 +15,41 @@
July 24, 2022
-

-luaL_checkint — -
checks whether the function argument is a - number
-

-#include - <lauxlib.h> -
-int -
-luaL_checkint(lua_State - *L, int - narg); -

-luaL_checkint() checks whether the function - argument narg is a number and returns this - number cast to an int. -

+

luaL_checkint — + checks whether the function argument is a number

+
+
+

+

#include + <lauxlib.h>

+

int +
+ luaL_checkint(lua_State + *L, int narg);

+
+
+

+

() + checks whether the function argument narg is a number + and returns this number cast to an + .

+
+
+

-Roberto Ierusalimschy, - Luiz Henrique de Figueiredo, and - Waldemar Celes, Lua 5.1 Reference - Manual. -

-The luaL_checkint() manual page was written - by Sergey Bronnikov.

+

Roberto Ierusalimschy, + Luiz Henrique de Figueiredo, and + Waldemar Celes, Lua 5.1 Reference + Manual.

+ +
+

+

The luaL_checkint() manual page was + written by Sergey Bronnikov.

+
+ blob - f8850e9b7a8210ad849f1e36f1abbfaf87748e6b blob + cd29d8066638fd7c42e06fef01b71c3728a9e694 --- luaL_checkinteger.3.html +++ luaL_checkinteger.3.html @@ -2,6 +2,7 @@ + LUAL_CHECKINTEGER(3) @@ -14,34 +15,41 @@
July 24, 2022
-

-luaL_checkinteger — -
checks whether the function argument is a - number
-

-#include - <lauxlib.h> -
-lua_Integer -
-luaL_checkinteger(lua_State - *L, int - narg); -

-luaL_checkinteger() checks whether the - function argument narg is a number and - returns this number cast to a lua_Integer(3). -

+

luaL_checkinteger — + checks whether the function argument is a number

+
+
+

+

#include + <lauxlib.h>

+

lua_Integer +
+ luaL_checkinteger(lua_State + *L, int narg);

+
+
+

+

() + checks whether the function argument narg is a number + and returns this number cast to a lua_Integer(3).

+
+
+

-lua_Integer(3) -
-Roberto Ierusalimschy, - Luiz Henrique de Figueiredo, and - Waldemar Celes, Lua 5.1 Reference - Manual. -

-The luaL_checkinteger() manual page was - written by Sergey Bronnikov.

+

lua_Integer(3)

+

Roberto Ierusalimschy, + Luiz Henrique de Figueiredo, and + Waldemar Celes, Lua 5.1 Reference + Manual.

+ +
+

+

The luaL_checkinteger() manual page was + written by Sergey Bronnikov.

+
+ blob - b7915b76057716e64a261bb95f141f56a0f98da2 blob + f6ea48967bfb32a930547372a6922dd661ed53b6 --- luaL_checklong.3.html +++ luaL_checklong.3.html @@ -2,6 +2,7 @@ + LUAL_CHECKLONG(3) @@ -14,32 +15,40 @@
July 24, 2022
-

-luaL_checklong — -
checks whether the function argument is a - number
-

-#include - <lauxlib.h> -
-long -
-luaL_checklong(lua_State - *L, int - narg); -

-luaL_checklong() checks whether the function - argument narg is a number and returns this - number cast to a long. -

+

luaL_checklong — + checks whether the function argument is a number

+
+
+

+

#include + <lauxlib.h>

+

long +
+ luaL_checklong(lua_State + *L, int narg);

+
+
+

+

() + checks whether the function argument narg is a number + and returns this number cast to a long.

+
+
+

-Roberto Ierusalimschy, - Luiz Henrique de Figueiredo, and - Waldemar Celes, Lua 5.1 Reference - Manual. -

-The luaL_checklong() manual page was written - by Sergey Bronnikov.

+

Roberto Ierusalimschy, + Luiz Henrique de Figueiredo, and + Waldemar Celes, Lua 5.1 Reference + Manual.

+ +
+

+

The luaL_checklong() manual page was + written by Sergey Bronnikov.

+
+ blob - 5d8fd8dde10ffc29222cfb283f189ab01b7ca6a4 blob + 1a0ff5982ef1531fe2c1acd852914e978a01fa6b --- luaL_checklstring.3.html +++ luaL_checklstring.3.html @@ -2,6 +2,7 @@ + LUAL_CHECKLSTRING(3) @@ -14,39 +15,45 @@
July 24, 2022
-

-luaL_checklstring — -
checks whether the function argument is a - string
-

-#include - <lauxlib.h> -
-const char * -
-luaL_checklstring(lua_State - *L, int - narg, size_t - *l); -

-luaL_checklstring() checks whether the - function argument narg is a string and - returns this string; if l is not NULL fills - *l with the string's length. -
-This function uses lua_tolstring(3) to get its - result, so all conversions and caveats of that function apply here. -

+

luaL_checklstring — + checks whether the function argument is a string

+
+
+

+

#include + <lauxlib.h>

+

const char * +
+ luaL_checklstring(lua_State + *L, int narg, + size_t *l);

+
+
+

+

() + checks whether the function argument narg is a string + and returns this string; if l is not NULL fills + *l with the string's length.

+

This function uses lua_tolstring(3) to get its + result, so all conversions and caveats of that function apply here.

+
+
+

-lua_tolstring(3) -
-Roberto Ierusalimschy, - Luiz Henrique de Figueiredo, and - Waldemar Celes, Lua 5.1 Reference - Manual. -

-The luaL_checklstring() manual page was - written by Sergey Bronnikov.

+

lua_tolstring(3)

+

Roberto Ierusalimschy, + Luiz Henrique de Figueiredo, and + Waldemar Celes, Lua 5.1 Reference + Manual.

+ +
+

+

The luaL_checklstring() manual page was + written by Sergey Bronnikov.

+
+ blob - 913193e0b038319cdc49cb3cc7d01b47ebec2d66 blob + 65fe763b384b851ceea6c95bbcc2fb2682fc09a4 --- luaL_checknumber.3.html +++ luaL_checknumber.3.html @@ -2,6 +2,7 @@ + LUAL_CHECKNUMBER(3) @@ -14,32 +15,41 @@
July 24, 2022
-

-luaL_checknumber — -
checks whether the function argument narg is a number - and returns this number
-

-#include - <lauxlib.h> -
-lua_Number -
-luaL_checknumber(lua_State - *L, int - narg); -

-luaL_checknumber() checks whether the - function argument narg is a number and - returns this number. -

+

luaL_checknumber — + checks whether the function argument narg is a number and + returns this number

+
+
+

+

#include + <lauxlib.h>

+

lua_Number +
+ luaL_checknumber(lua_State + *L, int narg);

+
+
+

+

() + checks whether the function argument narg is a number + and returns this number.

+
+
+

-Roberto Ierusalimschy, - Luiz Henrique de Figueiredo, and - Waldemar Celes, Lua 5.1 Reference - Manual. -

-The luaL_checknumber() manual page was - written by Sergey Bronnikov.

+

Roberto Ierusalimschy, + Luiz Henrique de Figueiredo, and + Waldemar Celes, Lua 5.1 Reference + Manual.

+ +
+

+

The luaL_checknumber() manual page was + written by Sergey Bronnikov.

+
+ blob - 59c5d21e86b659e76fb3162c10e4b72207733ce2 blob + 1a10b21ee5f55c01ae7ada3a5cd187360d7309dc --- luaL_checkoption.3.html +++ luaL_checkoption.3.html @@ -2,6 +2,7 @@ + LUAL_CHECKOPTION(3) @@ -14,45 +15,53 @@
July 24, 2022
-

-luaL_checkoption — -
checks whether the function argument is a - string
-

-#include - <lauxlib.h> -
-int -
-luaL_checkoption(lua_State - *L, int - narg, const char - *def, const char - *const lst[]); -

-luaL_checkoption() checks whether the - function argument narg is a string and - searches for this string in the array lst - (which must be NULL -terminated). Returns - the index in the array where the string was found. Raises an error if the - argument is not a string or if the string cannot be found. -
-If def is not - NULL, the function uses def as a default - value when there is no argument narg or if - this argument is nil. -
-This is a useful function for mapping strings to C enums. (The usual convention - in Lua libraries is to use strings instead of numbers to select options.) -

+

luaL_checkoption — + checks whether the function argument is a string

+
+
+

+

#include + <lauxlib.h>

+

int +
+ luaL_checkoption(lua_State + *L, int narg, + const char *def, + const char *const + lst[]);

+
+
+

+

() + checks whether the function argument narg is a string + and searches for this string in the array lst (which + must be NULL -terminated). Returns the index in the + array where the string was found. Raises an error if the argument is not a + string or if the string cannot be found.

+

If def is not NULL, + the function uses def as a default value when there is no argument + narg or if this argument is + nil.

+

This is a useful function for mapping strings to C enums. (The + usual convention in Lua libraries is to use strings instead of numbers to + select options.)

+
+
+

-Roberto Ierusalimschy, - Luiz Henrique de Figueiredo, and - Waldemar Celes, Lua 5.1 Reference - Manual. -

-The luaL_checkoption() manual page was - written by Sergey Bronnikov.

+

Roberto Ierusalimschy, + Luiz Henrique de Figueiredo, and + Waldemar Celes, Lua 5.1 Reference + Manual.

+ +
+

+

The luaL_checkoption() manual page was + written by Sergey Bronnikov.

+
+ blob - 3b5abc4b967b3e98d0c82e5a6a3c5b5444bacda5 blob + 882bf8082345b227ac98b4772a78637a958f414f --- luaL_checkstack.3.html +++ luaL_checkstack.3.html @@ -2,6 +2,7 @@ + LUAL_CHECKSTACK(3) @@ -14,34 +15,45 @@
July 24, 2022
-

-luaL_checkstack — -
grows the stack size to specified size of - elements
-

-#include - <lauxlib.h> -
-void -
-luaL_checkstack(lua_State - *L, int - sz, const char - *msg); -

-luaL_checkstack() grows the stack size to - top + sz elements, raising an error if the stack - cannot grow to that size. msg is an - additional text to go into the error message. -

+

luaL_checkstack — + grows the stack size to specified size of + elements

+
+
+

+

#include + <lauxlib.h>

+

void +
+ luaL_checkstack(lua_State + *L, int sz, + const char *msg);

+
+
+

+

() + grows the stack size to + + elements, raising an error if the stack cannot grow to that size. + msg is an additional text to go into the error + message.

+
+
+

-Roberto Ierusalimschy, - Luiz Henrique de Figueiredo, and - Waldemar Celes, Lua 5.1 Reference - Manual. -

-The luaL_checkstack() manual page was written - by Sergey Bronnikov.

+

Roberto Ierusalimschy, + Luiz Henrique de Figueiredo, and + Waldemar Celes, Lua 5.1 Reference + Manual.

+ +
+

+

The luaL_checkstack() manual page was + written by Sergey Bronnikov.

+
+ blob - 62e61f634dc814e053563e66663a3593a9211fdc blob + 055d7086d1e5660654e3d832e42201c60da8f784 --- luaL_checkstring.3.html +++ luaL_checkstring.3.html @@ -2,6 +2,7 @@ + LUAL_CHECKSTRING(3) @@ -14,37 +15,44 @@
July 24, 2022
-

-luaL_checkstring — -
checks whether the function argument is a string and - returns this string
-

-#include - <lauxlib.h> -
-const char * -
-luaL_checkstring(lua_State - *L, int - narg); -

-luaL_checkstring() checks whether the - function argument narg is a string and - returns this string. -
-This function uses lua_tolstring(3) to get its - result, so all conversions and caveats of that function apply here. -

+

luaL_checkstring — + checks whether the function argument is a string and + returns this string

+
+
+

+

#include + <lauxlib.h>

+

const char * +
+ luaL_checkstring(lua_State + *L, int narg);

+
+
+

+

() + checks whether the function argument narg is a string + and returns this string.

+

This function uses lua_tolstring(3) to get its + result, so all conversions and caveats of that function apply here.

+
+
+

-lua_tolstring(3) -
-Roberto Ierusalimschy, - Luiz Henrique de Figueiredo, and - Waldemar Celes, Lua 5.1 Reference - Manual. -

-The luaL_checkstring() manual page was - written by Sergey Bronnikov.

+

lua_tolstring(3)

+

Roberto Ierusalimschy, + Luiz Henrique de Figueiredo, and + Waldemar Celes, Lua 5.1 Reference + Manual.

+ +
+

+

The luaL_checkstring() manual page was + written by Sergey Bronnikov.

+
+ blob - 806d134215a25b213a70e1ff1485f5cec0f4e33d blob + 77df97768f97ddc330859b283279dee3ecb10fb9 --- luaL_checktype.3.html +++ luaL_checktype.3.html @@ -2,6 +2,7 @@ + LUAL_CHECKTYPE(3) @@ -14,37 +15,44 @@
July 24, 2022
-

-luaL_checktype — -
checks whether the function argument has a certain - type
-

-#include - <lauxlib.h> -
-void -
-luaL_checktype(lua_State - *L, int - narg, int - t); -

-luaL_checktype() checks whether the function - argument narg has type - t. See - lua_type(3) for the encoding of types for - t. -

+

luaL_checktype — + checks whether the function argument has a certain + type

+
+
+

+

#include + <lauxlib.h>

+

void +
+ luaL_checktype(lua_State + *L, int narg, + int t);

+
+
+

+

() + checks whether the function argument narg has type + t. See lua_type(3) for the encoding + of types for t.

+
+
+

-lua_type(3) -
-Roberto Ierusalimschy, - Luiz Henrique de Figueiredo, and - Waldemar Celes, Lua 5.1 Reference - Manual. -

-The luaL_checktype() manual page was written - by Sergey Bronnikov.

+

lua_type(3)

+

Roberto Ierusalimschy, + Luiz Henrique de Figueiredo, and + Waldemar Celes, Lua 5.1 Reference + Manual.

+ +
+

+

The luaL_checktype() manual page was + written by Sergey Bronnikov.

+
+ blob - e8c17cafe1160b7dab8bde71c41fd9987544ad32 blob + e060954f5d385fd095fc6ba096c64376342f20b2 --- luaL_checkudata.3.html +++ luaL_checkudata.3.html @@ -2,6 +2,7 @@ + LUAL_CHECKUDATA(3) @@ -14,36 +15,44 @@
July 24, 2022
-

-luaL_checkudata — -
checks whether the function argument is a userdata of - a certain type
-

-#include - <lauxlib.h> -
-void * -
-luaL_checkudata(lua_State - *L, int - narg, const char - *tname); -

-luaL_checkudata() checks whether the function - argument narg is a userdata of the type - tname (see - luaL_newmetatable(3)). -

+

luaL_checkudata — + checks whether the function argument is a userdata of a + certain type

+
+
+

+

#include + <lauxlib.h>

+

void * +
+ luaL_checkudata(lua_State + *L, int narg, + const char *tname);

+
+
+

+

() + checks whether the function argument narg is a + userdata of the type tname (see + luaL_newmetatable(3)).

+
+
+

-luaL_newmetatable(3) -
-Roberto Ierusalimschy, - Luiz Henrique de Figueiredo, and - Waldemar Celes, Lua 5.1 Reference - Manual. -

-The luaL_checkudata() manual page was written - by Sergey Bronnikov.

+

luaL_newmetatable(3)

+

Roberto Ierusalimschy, + Luiz Henrique de Figueiredo, and + Waldemar Celes, Lua 5.1 Reference + Manual.

+ +
+

+

The luaL_checkudata() manual page was + written by Sergey Bronnikov.

+
+ blob - 41922caa407092b0bfa605b2d30cef514038cf95 blob + 945d281ca49014a008929cba3b42bbc9b309e437 --- luaL_dofile.3.html +++ luaL_dofile.3.html @@ -2,6 +2,7 @@ + LUAL_DOFILE(3) @@ -14,39 +15,49 @@
July 24, 2022
-

-luaL_dofile — -
loads and runs the given file
-

-#include - <lauxlib.h> -
-int -
-luaL_dofile(lua_State - *L, const char - *filename); -

-luaL_dofile() loads and runs the given file. - It is defined as the following macro: -
-
-
-(luaL_loadfile(L, filename) || lua_pcall(L, 0, LUA_MULTRET, 0))
-
+
+

+

luaL_dofile — + loads and runs the given file

+
+
+

+

#include + <lauxlib.h>

+

int +
+ luaL_dofile(lua_State + *L, const char + *filename);

+
+
+

+

() + loads and runs the given file. It is defined as the following macro:

+

+
+
(luaL_loadfile(L, filename) || lua_pcall(L, 0, LUA_MULTRET, 0))
-

-It returns 0 if there are no errors or 1 in case of errors. -

-Roberto Ierusalimschy, - Luiz Henrique de Figueiredo, and - Waldemar Celes, Lua 5.1 Reference - Manual. -

-The luaL_dofile() manual page was written by - Sergey Bronnikov.
+

Roberto Ierusalimschy, + Luiz Henrique de Figueiredo, and + Waldemar Celes, Lua 5.1 Reference + Manual.

+ +
+

+

The luaL_dofile() manual page was written + by Sergey Bronnikov.

+
+
blob - a35832a3d4249cfa9bebf3b3104d861f0c956b21 blob + 9e5f0e56f604719342bb4625fe8cf1cb03c81217 --- luaL_dostring.3.html +++ luaL_dostring.3.html @@ -2,6 +2,7 @@ + LUAL_DOSTRING(3) @@ -14,39 +15,49 @@
July 24, 2022
-

-luaL_dostring — -
loads and runs the given string
-

-#include - <lauxlib.h> -
-int -
-luaL_dostring(lua_State - *L, const char - *str); -

-luaL_dostring() loads and runs the given - string. It is defined as the following macro: -
-
-
-(luaL_loadstring(L, str) || lua_pcall(L, 0, LUA_MULTRET, 0))
-
+
+

+

luaL_dostring — + loads and runs the given string

+
+
+

+

#include + <lauxlib.h>

+

int +
+ luaL_dostring(lua_State + *L, const char + *str);

+
+
+

+

() + loads and runs the given string. It is defined as the following macro:

+

+
+
(luaL_loadstring(L, str) || lua_pcall(L, 0, LUA_MULTRET, 0))
-

-It returns 0 if there are no errors or 1 in case of errors. -

-Roberto Ierusalimschy, - Luiz Henrique de Figueiredo, and - Waldemar Celes, Lua 5.1 Reference - Manual. -

-The luaL_dostring() manual page was written - by Sergey Bronnikov.
+

Roberto Ierusalimschy, + Luiz Henrique de Figueiredo, and + Waldemar Celes, Lua 5.1 Reference + Manual.

+ +
+

+

The luaL_dostring() manual page was + written by Sergey Bronnikov.

+
+
blob - 24f9d05072d26944db63f80aad10004465138f19 blob + 3ea795be6f855f7cd23c263c3c662c448a26c7a3 --- luaL_error.3.html +++ luaL_error.3.html @@ -2,6 +2,7 @@ + LUAL_ERROR(3) @@ -14,40 +15,48 @@
July 24, 2022
-

-luaL_error — -
raises an error
-

-#include - <lauxlib.h> -
-int -
-luaL_error(lua_State - *L, const char - *fmt, - ...); -

-luaL_error() raises an error. The error - message format is given by fmt plus any extra - arguments, following the same rules of - lua_pushfstring(3). It also adds at the beginning - of the message the file name and the line number where the error occurred, if - this information is available. -
-This function never returns, but it is an idiom to use it in C functions as - return luaL_error(args). -

+

luaL_error — + raises an error

+
+
+

+

#include + <lauxlib.h>

+

int +
+ luaL_error(lua_State + *L, const char + *fmt, ...);

+
+
+

+

() + raises an error. The error message format is given by + fmt plus any extra arguments, following the same rules + of lua_pushfstring(3). It also adds at the beginning of + the message the file name and the line number where the error occurred, if + this information is available.

+

This function never returns, but it is an + idiom to use it in C functions as return + .

+
+
+

-lua_pushfstring(3) -
-Roberto Ierusalimschy, - Luiz Henrique de Figueiredo, and - Waldemar Celes, Lua 5.1 Reference - Manual. -

-The luaL_error() manual page was written by - Sergey Bronnikov.

+

lua_pushfstring(3)

+

Roberto Ierusalimschy, + Luiz Henrique de Figueiredo, and + Waldemar Celes, Lua 5.1 Reference + Manual.

+ +
+

+

The luaL_error() manual page was written + by Sergey Bronnikov.

+
+ blob - b6e903aedf8dd545d4053aff07319850c940ecc3 blob + c54befe134241bfd8db9900bad5cdca0b03b29a6 --- luaL_getmetafield.3.html +++ luaL_getmetafield.3.html @@ -2,6 +2,7 @@ + LUAL_GETMETAFIELD(3) @@ -14,35 +15,44 @@
July 24, 2022
-

-luaL_getmetafield — -
pushes onto the stack the field from the metatable of - the object at the specified index
-

-#include - <lauxlib.h> -
-int -
-luaL_getmetafield(lua_State - *L, int - obj, const char - *e); -

-luaL_getmetafield() pushes onto the stack the - field e from the metatable of the object at - index obj. If the object does not have a - metatable, or if the metatable does not have this field, returns 0 and pushes - nothing. -

+

luaL_getmetafield — + pushes onto the stack the field from the metatable of the + object at the specified index

+
+
+

+

#include + <lauxlib.h>

+

int +
+ luaL_getmetafield(lua_State + *L, int obj, + const char *e);

+
+
+

+

() + pushes onto the stack the field e from the metatable + of the object at index obj. If the object does not + have a metatable, or if the metatable does not have this field, returns 0 + and pushes nothing.

+
+
+

-Roberto Ierusalimschy, - Luiz Henrique de Figueiredo, and - Waldemar Celes, Lua 5.1 Reference - Manual. -

-The luaL_getmetafield() manual page was - written by Sergey Bronnikov.

+

Roberto Ierusalimschy, + Luiz Henrique de Figueiredo, and + Waldemar Celes, Lua 5.1 Reference + Manual.

+ +
+

+

The luaL_getmetafield() manual page was + written by Sergey Bronnikov.

+
+ blob - cadeda91e86f519991ddfabe32a4e9ae73f718de blob + 1190c04a7981f3eae43d3a302183a5779c8ffec9 --- luaL_getmetatable.3.html +++ luaL_getmetatable.3.html @@ -2,6 +2,7 @@ + LUAL_GETMETATABLE(3) @@ -14,34 +15,44 @@
July 24, 2022
-

-luaL_getmetatable — -
pushes onto the stack the metatable associated with - name in the registry
-

-#include - <lauxlib.h> -
-void -
-luaL_getmetatable(lua_State - *L, const char - *tname); -

-luaL_getmetatable() pushes onto the stack the - metatable associated with name tname in the - registry (see luaL_newmetatable(3)). -

+

luaL_getmetatable — + pushes onto the stack the metatable associated with name in + the registry

+
+
+

+

#include + <lauxlib.h>

+

void +
+ luaL_getmetatable(lua_State + *L, const char + *tname);

+
+
+

+

() + pushes onto the stack the metatable associated with name + tname in the registry (see + luaL_newmetatable(3)).

+
+
+

-luaL_newmetatable(3) -
-Roberto Ierusalimschy, - Luiz Henrique de Figueiredo, and - Waldemar Celes, Lua 5.1 Reference - Manual. -

-The luaL_getmetatable() manual page was - written by Sergey Bronnikov.

+

luaL_newmetatable(3)

+

Roberto Ierusalimschy, + Luiz Henrique de Figueiredo, and + Waldemar Celes, Lua 5.1 Reference + Manual.

+ +
+

+

The luaL_getmetatable() manual page was + written by Sergey Bronnikov.

+
+ blob - da9494910c934deeb5b40b78c8ce9143f4227db8 blob + 499a212dc3180c391d74a9c31a5084274bc1f722 --- luaL_gsub.3.html +++ luaL_gsub.3.html @@ -2,6 +2,7 @@ + LUAL_GSUB(3) @@ -14,36 +15,45 @@
July 24, 2022
-

-luaL_gsub — -
creates a copy of string A by replacing any - occurrence of the string B with the string C
-

-#include - <lauxlib.h> -
-const char * -
-luaL_gsub(lua_State - *L, const char - *s, const char - *p, const char - *r); -

-luaL_gsub() creates a copy of string - s by replacing any occurrence of the string - p with the string - r. Pushes the resulting string on the stack - and returns it. -

+

luaL_gsub — + creates a copy of string A by replacing any occurrence of + the string B with the string C

+
+
+

+

#include + <lauxlib.h>

+

const char * +
+ luaL_gsub(lua_State + *L, const char *s, + const char *p, + const char *r);

+
+
+

+

() + creates a copy of string s by replacing any occurrence + of the string p with the string + r. Pushes the resulting string on the stack and + returns it.

+
+
+

-Roberto Ierusalimschy, - Luiz Henrique de Figueiredo, and - Waldemar Celes, Lua 5.1 Reference - Manual. -

-The luaL_gsub() manual page was written by - Sergey Bronnikov.

+

Roberto Ierusalimschy, + Luiz Henrique de Figueiredo, and + Waldemar Celes, Lua 5.1 Reference + Manual.

+ +
+

+

The luaL_gsub() manual page was written by + Sergey Bronnikov.

+
+ blob - 63b9f0abf5bdb015fd8872027fb009ef038807b3 blob + cfc69c978e2d34be9dea657348205c0a3df1c3ac --- luaL_loadbuffer.3.html +++ luaL_loadbuffer.3.html @@ -2,6 +2,7 @@ + LUAL_LOADBUFFER(3) @@ -14,41 +15,47 @@
July 24, 2022
-

-luaL_loadbuffer — -
loads a buffer as a Lua chunk
-

-#include - <lauxlib.h> -
-int -
-luaL_loadbuffer(lua_State - *L, const char - *buff, size_t - sz, const char - *name); -

-luaL_loadbuffer() loads a buffer as a Lua - chunk. This function uses lua_load(3) to load the - chunk in the buffer pointed to by buff with - size sz. -
-This function returns the same results as - lua_load(3). - name is the chunk name, used for debug - information and error messages. -

+

luaL_loadbuffer — + loads a buffer as a Lua chunk

+
+
+

+

#include + <lauxlib.h>

+

int +
+ luaL_loadbuffer(lua_State + *L, const char + *buff, size_t sz, + const char *name);

+
+
+

+

() + loads a buffer as a Lua chunk. This function uses + lua_load(3) to load the chunk in the buffer pointed to by + buff with size sz.

+

This function returns the same results as + lua_load(3). name is the chunk name, + used for debug information and error messages.

+
+
+

-lua_load(3) -
-Roberto Ierusalimschy, - Luiz Henrique de Figueiredo, and - Waldemar Celes, Lua 5.1 Reference - Manual. -

-The luaL_loadbuffer() manual page was written - by Sergey Bronnikov.

+

lua_load(3)

+

Roberto Ierusalimschy, + Luiz Henrique de Figueiredo, and + Waldemar Celes, Lua 5.1 Reference + Manual.

+ +
+

+

The luaL_loadbuffer() manual page was + written by Sergey Bronnikov.

+
+ blob - 9bf05468dbfadece23e8f2445f118db69e87db43 blob + 6298ea80a047dd3533d303bf81dfea7f8a13c419 --- luaL_loadfile.3.html +++ luaL_loadfile.3.html @@ -2,6 +2,7 @@ + LUAL_LOADFILE(3) @@ -14,45 +15,55 @@
July 24, 2022
-

-luaL_loadfile — -
loads a file as a Lua chunk
-

-#include - <lauxlib.h> -
-int -
-luaL_loadfile(lua_State - *L, const char - *filename); -

-luaL_loadfile() loads a file as a Lua chunk. - This function uses lua_load(3) to load the chunk - in the file named filename. If filename is - NULL, then it loads from the standard - input. The first line in the file is ignored if it starts with a - #. -
-As lua_load(3), this function only loads the chunk; - it does not run it. -

+

luaL_loadfile — + loads a file as a Lua chunk

+
+
+

+

#include + <lauxlib.h>

+

int +
+ luaL_loadfile(lua_State + *L, const char + *filename);

+
+
+

+

() + loads a file as a Lua chunk. This function uses + lua_load(3) to load the chunk in the file named + filename. If filename is NULL, + then it loads from the standard input. The first line in the file is ignored + if it starts with a + .

+

As lua_load(3), this function only loads the + chunk; it does not run it.

+
+
+

-This function returns the same results as - lua_load(3), but it has an extra error code - LUA_ERRFILE if it cannot open/read the - file. -

lua_load(3), but it has an extra error code + LUA_ERRFILE if it cannot open/read the file.

+

+
+

-lua_load(3) -
-Roberto Ierusalimschy, - Luiz Henrique de Figueiredo, and - Waldemar Celes, Lua 5.1 Reference - Manual. -

-The luaL_loadfile() manual page was written - by Sergey Bronnikov.

+

lua_load(3)

+

Roberto Ierusalimschy, + Luiz Henrique de Figueiredo, and + Waldemar Celes, Lua 5.1 Reference + Manual.

+ +
+

+

The luaL_loadfile() manual page was + written by Sergey Bronnikov.

+
+ blob - d52f06f17c37ce0635f06fe04f354a1f58c07e36 blob + d43cb96f9331d20b57895ae44bbfe1b4b5a9bf7f --- luaL_loadstring.3.html +++ luaL_loadstring.3.html @@ -2,6 +2,7 @@ + LUAL_LOADSTRING(3) @@ -14,39 +15,47 @@
July 24, 2022
-

-luaL_loadstring — -
loads a string as a Lua chunk
-

-#include - <lauxlib.h> -
-int -
-luaL_loadstring(lua_State - *L, const char - *s); -

-luaL_loadstring() loads a string as a Lua - chunk. This function uses lua_load(3) to load the - chunk in the zero-terminated string s. -
-This function returns the same results as - lua_load(3). -
-Also as lua_load(3), this function only loads the - chunk; it does not run it. -

+

luaL_loadstring — + loads a string as a Lua chunk

+
+
+

+

#include + <lauxlib.h>

+

int +
+ luaL_loadstring(lua_State + *L, const char + *s);

+
+
+

+

() + loads a string as a Lua chunk. This function uses + lua_load(3) to load the chunk in the zero-terminated + string s.

+

This function returns the same results as + lua_load(3).

+

Also as lua_load(3), this function only loads + the chunk; it does not run it.

+
+
+

-lua_load(3) -
-Roberto Ierusalimschy, - Luiz Henrique de Figueiredo, and - Waldemar Celes, Lua 5.1 Reference - Manual. -

-The luaL_loadstring() manual page was written - by Sergey Bronnikov.

+

lua_load(3)

+

Roberto Ierusalimschy, + Luiz Henrique de Figueiredo, and + Waldemar Celes, Lua 5.1 Reference + Manual.

+ +
+

+

The luaL_loadstring() manual page was + written by Sergey Bronnikov.

+
+ blob - 37d36dbb19d7057530bf7cd222d8a68dbed8121f blob + 472e35707eb18c5604ed65919acc9feb9dbd2fa5 --- luaL_newmetatable.3.html +++ luaL_newmetatable.3.html @@ -2,6 +2,7 @@ + LUAL_NEWMETATABLE(3) @@ -14,36 +15,45 @@
July 24, 2022
-

-luaL_newmetatable — -
creates a new table to be used as a metatable for - userdata
-

-#include - <lauxlib.h> -
-int -
-luaL_newmetatable(lua_State - *L, const char - *tname); -

-luaL_newmetatable() If the registry already - has the key tname, returns 0. Otherwise, - creates a new table to be used as a metatable for userdata, adds it to the - registry with key tname, and returns 1. -
-In both cases pushes onto the stack the final value associated with - tname in the registry. -

+

luaL_newmetatable — + creates a new table to be used as a metatable for + userdata

+
+
+

+

#include + <lauxlib.h>

+

int +
+ luaL_newmetatable(lua_State + *L, const char + *tname);

+
+
+

+

() + If the registry already has the key tname, returns 0. + Otherwise, creates a new table to be used as a metatable for userdata, adds + it to the registry with key tname, and returns 1.

+

In both cases pushes onto the stack the final value associated + with tname in the registry.

+
+
+

-Roberto Ierusalimschy, - Luiz Henrique de Figueiredo, and - Waldemar Celes, Lua 5.1 Reference - Manual. -

-The luaL_newmetatable() manual page was - written by Sergey Bronnikov.

+

Roberto Ierusalimschy, + Luiz Henrique de Figueiredo, and + Waldemar Celes, Lua 5.1 Reference + Manual.

+ +
+

+

The luaL_newmetatable() manual page was + written by Sergey Bronnikov.

+
+ blob - d021b123d47aa73b39cec690bb6a8b4fac138fc7 blob + 2514449bad8e76fef3ac5f0f29f040e3abd23e6b --- luaL_newstate.3.html +++ luaL_newstate.3.html @@ -2,6 +2,7 @@ + LUAL_NEWSTATE(3) @@ -14,38 +15,50 @@
July 26, 2022
-

-luaL_newstate — -
creates a new Lua state
-

-#include - <lauxlib.h> -
-lua_State * -
-luaL_newstate(void); -

-luaL_newstate() creates a new Lua state. It - calls lua_newstate(3) with an allocator based on - the standard C realloc(3) function and then sets - a panic function (see lua_atpanic(3)) that prints - an error message to the standard error output in case of fatal errors. -

+

luaL_newstate — + creates a new Lua state

+
+
+

+

#include + <lauxlib.h>

+

lua_State * +
+ luaL_newstate(void);

+
+
+

+

() + creates a new Lua state. It calls lua_newstate(3) with an + allocator based on the standard C realloc(3) function and + then sets a panic function (see lua_atpanic(3)) that + prints an error message to the standard error output in case of fatal + errors.

+
+
+

-Returns the new state, or NULL if there is a - memory allocation error. -

-lua_atpanic(3), - lua_newstate(3) -
-Roberto Ierusalimschy, - Luiz Henrique de Figueiredo, and - Waldemar Celes, Lua 5.1 Reference - Manual. -

-The luaL_newstate() manual page was written - by Sergey Bronnikov.

+

lua_atpanic(3), + lua_newstate(3)

+

Roberto Ierusalimschy, + Luiz Henrique de Figueiredo, and + Waldemar Celes, Lua 5.1 Reference + Manual.

+ +
+

+

The luaL_newstate() manual page was + written by Sergey Bronnikov.

+
+ blob - c75d950bcbe09c73880399ae65819a8148484229 blob + 0769a4f69e2f0dc6120b50610c12e2336bb2ecee --- luaL_openlibs.3.html +++ luaL_openlibs.3.html @@ -2,6 +2,7 @@ + LUAL_OPENLIBS(3) @@ -14,30 +15,40 @@
July 26, 2022
-

-luaL_openlibs — -
opens all standard Lua libraries into the given - state
-

-#include - <lauxlib.h> -
-void -
-luaL_openlibs(lua_State - *L); -

-luaL_openlibs() opens all standard Lua - libraries into the given state. -

+

luaL_openlibs — + opens all standard Lua libraries into the given + state

+
+
+

+

#include + <lauxlib.h>

+

void +
+ luaL_openlibs(lua_State + *L);

+
+
+

+

() + opens all standard Lua libraries into the given state.

+
+
+

-Roberto Ierusalimschy, - Luiz Henrique de Figueiredo, and - Waldemar Celes, Lua 5.1 Reference - Manual. -

-The luaL_openlibs() manual page was written - by Sergey Bronnikov.

+

Roberto Ierusalimschy, + Luiz Henrique de Figueiredo, and + Waldemar Celes, Lua 5.1 Reference + Manual.

+ +
+

+

The luaL_openlibs() manual page was + written by Sergey Bronnikov.

+
+ blob - 433deec1cff8a1f7571102a7d2a84557cf89f5f1 blob + ed002ef04e5f80b1303f68bd1e4930d3dff9f28e --- luaL_optint.3.html +++ luaL_optint.3.html @@ -2,6 +2,7 @@ + LUAL_OPTINT(3) @@ -14,34 +15,43 @@
July 26, 2022
-

-luaL_optint — -
casts a number to an int
-

-#include - <lauxlib.h> -
-int -
-luaL_optint(lua_State - *L, int - narg, int - d); -

-luaL_optint() if the function argument - narg is a number, returns this number cast to - an int. If this argument is absent or is - nil, returns - d. Otherwise, raises an error. -

+

luaL_optint — + casts a number to an int

+
+
+

+

#include + <lauxlib.h>

+

int +
+ luaL_optint(lua_State + *L, int narg, + int d);

+
+
+

+

() + if the function argument narg is a number, returns + this number cast to an int. If this argument is absent or is + nil, returns d. Otherwise, + raises an error.

+
+
+

-Roberto Ierusalimschy, - Luiz Henrique de Figueiredo, and - Waldemar Celes, Lua 5.1 Reference - Manual. -

-The luaL_optint() manual page was written by - Sergey Bronnikov.

+

Roberto Ierusalimschy, + Luiz Henrique de Figueiredo, and + Waldemar Celes, Lua 5.1 Reference + Manual.

+ +
+

+

The luaL_optint() manual page was written + by Sergey Bronnikov.

+
+ blob - 3b643c6fa2dc966ae6bef82c7040941236c95f52 blob + 0f6bb96e3ed6cb13508ab89d97392b0250b9fd8f --- luaL_optinteger.3.html +++ luaL_optinteger.3.html @@ -2,6 +2,7 @@ + LUAL_OPTINTEGER(3) @@ -14,36 +15,44 @@
July 26, 2022
-

-luaL_optinteger — -
casts a number to a lua_Integer
-

-#include - <lauxlib.h> -
-lua_Integer -
-luaL_optinteger(lua_State - *L, int - narg, - lua_Integer d); -

-luaL_optinteger() if the function argument - narg is a number, returns this number cast to - a lua_Integer(3). If this argument is absent or - is nil, returns - d. Otherwise, raises an error. -

+

luaL_optinteger — + casts a number to a lua_Integer

+
+
+

+

#include + <lauxlib.h>

+

lua_Integer +
+ luaL_optinteger(lua_State + *L, int narg, + lua_Integer d);

+
+
+

+

() + if the function argument narg is a number, returns + this number cast to a lua_Integer(3). If this argument is + absent or is nil, returns d. + Otherwise, raises an error.

+
+
+

-lua_Integer(3) -
-Roberto Ierusalimschy, - Luiz Henrique de Figueiredo, and - Waldemar Celes, Lua 5.1 Reference - Manual. -

-The luaL_optinteger() manual page was written - by Sergey Bronnikov.

+

lua_Integer(3)

+

Roberto Ierusalimschy, + Luiz Henrique de Figueiredo, and + Waldemar Celes, Lua 5.1 Reference + Manual.

+ +
+

+

The luaL_optinteger() manual page was + written by Sergey Bronnikov.

+
+ blob - 10e72f55bd20fec4c0c443a1839041a4b1832998 blob + ac24b22a9dff3c037564130adb2532a97a2803e7 --- luaL_optlong.3.html +++ luaL_optlong.3.html @@ -2,6 +2,7 @@ + LUAL_OPTLONG(3) @@ -14,33 +15,42 @@
July 26, 2022
-

-luaL_optlong — -
casts a number to a long
-

-#include - <lauxlib.h> -
-long -
-luaL_optlong(lua_State - *L, int - narg, long - d); -

-luaL_optlong() if the function argument narg - is a number, returns this number cast to a long. If this argument is absent or - is nil, returns - d. Otherwise, raises an error. -

+

luaL_optlong — + casts a number to a long

+
+
+

+

#include + <lauxlib.h>

+

long +
+ luaL_optlong(lua_State + *L, int narg, + long d);

+
+
+

+

() + if the function argument narg is a number, returns this number cast to a + long. If this argument is absent or is nil, returns + d. Otherwise, raises an error.

+
+
+

-Roberto Ierusalimschy, - Luiz Henrique de Figueiredo, and - Waldemar Celes, Lua 5.1 Reference - Manual. -

-The luaL_optlong() manual page was written by - Sergey Bronnikov.

+

Roberto Ierusalimschy, + Luiz Henrique de Figueiredo, and + Waldemar Celes, Lua 5.1 Reference + Manual.

+ +
+

+

The luaL_optlong() manual page was written + by Sergey Bronnikov.

+
+ blob - fd83acff3ecf054cceecc278b203bd4f92e738a5 blob + 80ef8967f9d4e2b565bb3e0d3a44608f613f79d9 --- luaL_optlstring.3.html +++ luaL_optlstring.3.html @@ -2,6 +2,7 @@ + LUAL_OPTLSTRING(3) @@ -14,39 +15,46 @@
July 26, 2022
-

-luaL_optlstring — -
if the function argument is a string, returns this - string
-

-#include - <lauxlib.h> -
-const char * -
-luaL_optlstring(lua_State - *L, int - narg, const char - *d, size_t - *l); -

-luaL_optlstring() if the function argument - narg is a string, returns this string. If - this argument is absent or is nil, returns - d. Otherwise, raises an error. -
-If l is not - NULL, fills the position - *l with the results's length. -

+

luaL_optlstring — + if the function argument is a string, returns this + string

+
+
+

+

#include + <lauxlib.h>

+

const char * +
+ luaL_optlstring(lua_State + *L, int narg, + const char *d, + size_t *l);

+
+
+

+

() + if the function argument narg is a string, returns + this string. If this argument is absent or is nil, + returns d. Otherwise, raises an error.

+

If l is not NULL, + fills the position *l with the results's length.

+
+
+

-Roberto Ierusalimschy, - Luiz Henrique de Figueiredo, and - Waldemar Celes, Lua 5.1 Reference - Manual. -

-The luaL_optlstring() manual page was written - by Sergey Bronnikov.

+

Roberto Ierusalimschy, + Luiz Henrique de Figueiredo, and + Waldemar Celes, Lua 5.1 Reference + Manual.

+ +
+

+

The luaL_optlstring() manual page was + written by Sergey Bronnikov.

+
+ blob - c53c102671e5610484e6002e94f05e401aa5ad7f blob + f7635751010ca324173c6459268c7dfc89969a4f --- luaL_optnumber.3.html +++ luaL_optnumber.3.html @@ -2,6 +2,7 @@ + LUAL_OPTNUMBER(3) @@ -14,34 +15,43 @@
July 26, 2022
-

-luaL_optnumber — -
if the function argument is a number, returns this - number
-

-#include - <lauxlib.h> -
-lua_Number -
-luaL_optnumber(lua_State - *L, int - narg, lua_Number - d); -

-luaL_optnumber() if the function argument - narg is a number, returns this number. If - this argument is absent or is nil, returns - d. Otherwise, raises an error. -

+

luaL_optnumber — + if the function argument is a number, returns this + number

+
+
+

+

#include + <lauxlib.h>

+

lua_Number +
+ luaL_optnumber(lua_State + *L, int narg, + lua_Number d);

+
+
+

+

() + if the function argument narg is a number, returns + this number. If this argument is absent or is nil, + returns d. Otherwise, raises an error.

+
+
+

-Roberto Ierusalimschy, - Luiz Henrique de Figueiredo, and - Waldemar Celes, Lua 5.1 Reference - Manual. -

-The luaL_optnumber() manual page was written - by Sergey Bronnikov.

+

Roberto Ierusalimschy, + Luiz Henrique de Figueiredo, and + Waldemar Celes, Lua 5.1 Reference + Manual.

+ +
+

+

The luaL_optnumber() manual page was + written by Sergey Bronnikov.

+
+ blob - 09066d0388e2f4bd654a87ad1fd8b008d3862e56 blob + 2d2798fb38479962279f1a51983179abfcaef7f9 --- luaL_optstring.3.html +++ luaL_optstring.3.html @@ -2,6 +2,7 @@ + LUAL_OPTSTRING(3) @@ -14,34 +15,43 @@
July 26, 2022
-

-luaL_optstring — -
if the function argument is a string, returns this - string
-

-#include - <lauxlib.h> -
-const char * -
-luaL_optstring(lua_State - *L, int - narg, const char - *d); -

-luaL_optstring() if the function argument - narg is a string, returns this string. If - this argument is absent or is nil, returns - d. Otherwise, raises an error. -

+

luaL_optstring — + if the function argument is a string, returns this + string

+
+
+

+

#include + <lauxlib.h>

+

const char * +
+ luaL_optstring(lua_State + *L, int narg, + const char *d);

+
+
+

+

() + if the function argument narg is a string, returns + this string. If this argument is absent or is nil, + returns d. Otherwise, raises an error.

+
+
+

-Roberto Ierusalimschy, - Luiz Henrique de Figueiredo, and - Waldemar Celes, Lua 5.1 Reference - Manual. -

-The luaL_optstring() manual page was written - by Sergey Bronnikov.

+

Roberto Ierusalimschy, + Luiz Henrique de Figueiredo, and + Waldemar Celes, Lua 5.1 Reference + Manual.

+ +
+

+

The luaL_optstring() manual page was + written by Sergey Bronnikov.

+
+ blob - 8797209914daf88e6d3cb592f8779ec70bab490d blob + 55564bbe68ad1cf2f65a32d6b4703b09a473e664 --- luaL_prepbuffer.3.html +++ luaL_prepbuffer.3.html @@ -2,6 +2,7 @@ + LUAL_PREPBUFFER(3) @@ -14,36 +15,46 @@
July 26, 2022
-

-luaL_prepbuffer — -
prepares a buffer luaL_Buffer
-

-#include - <lauxlib.h> -
-char * -
-luaL_prepbuffer(luaL_Buffer - *B); -

-luaL_prepbuffer() returns an address to a - space of size LUAL_BUFFERSIZE where you can - copy a string to be added to buffer B (see - luaL_Buffer(3)). After copying the string into - this space you must call luaL_addsize(3) with the - size of the string to actually add it to the buffer. -

+

luaL_prepbuffer — + prepares a buffer luaL_Buffer

+
+
+

+

#include + <lauxlib.h>

+

char * +
+ luaL_prepbuffer(luaL_Buffer + *B);

+
+
+

+

() + returns an address to a space of size + LUAL_BUFFERSIZE where you can copy a string to be + added to buffer B (see + luaL_Buffer(3)). After copying the string into this space + you must call luaL_addsize(3) with the size of the string + to actually add it to the buffer.

+
+
+

-luaL_addsize(3), - luaL_Buffer(3) -
-Roberto Ierusalimschy, - Luiz Henrique de Figueiredo, and - Waldemar Celes, Lua 5.1 Reference - Manual. -

-The luaL_prepbuffer() manual page was written - by Sergey Bronnikov.

+

luaL_addsize(3), + luaL_Buffer(3)

+

Roberto Ierusalimschy, + Luiz Henrique de Figueiredo, and + Waldemar Celes, Lua 5.1 Reference + Manual.

+ +
+

+

The luaL_prepbuffer() manual page was + written by Sergey Bronnikov.

+
+ blob - 7e05c4ce22483694ea54543b2cc236ea375a6091 blob + 91e8a88faebe241eadd6817533d73f793e97aafa --- luaL_pushresult.3.html +++ luaL_pushresult.3.html @@ -2,6 +2,7 @@ + LUAL_PUSHRESULT(3) @@ -14,30 +15,40 @@
July 26, 2022
-

-luaL_pushresult — -
finishes the use of buffer
-

-#include - <luaxlib.h> -
-void -
-luaL_pushresult(luaL_Buffer - *B); -

-luaL_pushresult() finishes the use of buffer - B leaving the final string on the top of the - stack. -

+

luaL_pushresult — + finishes the use of buffer

+
+
+

+

#include + <luaxlib.h>

+

void +
+ luaL_pushresult(luaL_Buffer + *B);

+
+
+

+

() + finishes the use of buffer B leaving the final string + on the top of the stack.

+
+
+

-Roberto Ierusalimschy, - Luiz Henrique de Figueiredo, and - Waldemar Celes, Lua 5.1 Reference - Manual. -

-The luaL_pushresult() manual page was written - by Sergey Bronnikov.

+

Roberto Ierusalimschy, + Luiz Henrique de Figueiredo, and + Waldemar Celes, Lua 5.1 Reference + Manual.

+ +
+

+

The luaL_pushresult() manual page was + written by Sergey Bronnikov.

+
+ blob - cc9d1c81f82d13ac07ce0716097ca677aa583f70 blob + e8d89f1e0995100bf6c6723700f769ec1c3c4de7 --- luaL_ref.3.html +++ luaL_ref.3.html @@ -2,6 +2,7 @@ + LUAL_REF(3) @@ -14,50 +15,60 @@
July 22, 2022
-

-luaL_ref — -
creates and returns a reference for the object at the - top of the stack and pops the object
-

-#include - <lauxlib.h> -
-int -
-luaL_ref(lua_State - *L, int - t); -

-luaL_ref() creates and returns a - reference, in the table at index - t, for the object at the top of the stack - (and pops the object). -
-A reference is a unique integer key. As long as you do not manually add integer - keys into table t, - luaL_ref ensures the uniqueness of the key - it returns. You can retrieve an object referred by reference r by calling - lua_rawgeti(L, t, r). Function - luaL_unref(3) frees a reference and its - associated object. -

+

luaL_refcreates + and returns a reference for the object at the top of the stack and pops the + object

+
+
+

+

#include + <lauxlib.h>

+

int +
+ luaL_ref(lua_State + *L, int t);

+
+
+

+

() + creates and returns a + , + in the table at index t, for the object at the top of + the stack (and pops the object).

+

A reference is a unique integer key. As long + as you do not manually add integer keys into table t, + luaL_ref ensures the uniqueness of the key it + returns. You can retrieve an object referred by reference r by calling + . Function luaL_unref(3) frees a reference and + its associated object.

+
+
+

-If the object at the top of the stack is nil, - luaL_ref returns the constant - LUA_REFNIL. The constant - LUA_NOREF is guaranteed to be different - from any reference returned by luaL_ref. -

-luaL_unref(3) -
-Roberto Ierusalimschy, - Luiz Henrique de Figueiredo, and - Waldemar Celes, Lua 5.1 Reference - Manual. -

-The luaL_ref() manual page was written by - Sergey Bronnikov.

+

luaL_unref(3)

+

Roberto Ierusalimschy, + Luiz Henrique de Figueiredo, and + Waldemar Celes, Lua 5.1 Reference + Manual.

+ +
+

+

The luaL_ref() manual page was written by + Sergey Bronnikov.

+
+ blob - 0cfeb40650ac5c4d773155cf924033dcd8900c12 blob + e5546568a4e8d0a51214c5d851e18a66c2125fbb --- luaL_register.3.html +++ luaL_register.3.html @@ -2,6 +2,7 @@ + LUAL_REGISTER(3) @@ -14,50 +15,56 @@
July 21, 2022
-

-luaL_register — -
opens a library
-

-#include - <lauxlib.h> -
-void -
-luaL_register(lua_State - *L, const char - *libname, const - luaL_Reg *l); -

-luaL_register() opens a library. -
-When called with libname equal to - NULL, it simply registers all functions in - the list l (see - luaL_Reg(3)) into the table on the top of the - stack. -
-When called with a non-null libname, - luaL_register 3 creates a new table t, sets - it as the value of the global variable - libname, sets it as the value of - package.loaded[libname], and registers on it all - functions in the list l. If there is a table - in package.loaded[libname] or in variable - libname, reuses this table instead of - creating a new one. -
-In any case the function leaves the table on the top of the stack. -

+

luaL_register — + opens a library

+
+
+

+

#include + <lauxlib.h>

+

void +
+ luaL_register(lua_State + *L, const char + *libname, const luaL_Reg + *l);

+
+
+

+

() + opens a library.

+

When called with libname equal to + NULL, it simply registers all functions in the list + l (see luaL_Reg(3)) into the table + on the top of the stack.

+

When called with a non-null libname, + luaL_register 3 creates a new table t, sets it as + the value of the global variable libname, sets it as + the value of package.loaded[libname], and registers on it + all functions in the list l. If there is a table in + package.loaded[libname] or in variable + libname, reuses this table instead of creating a new + one.

+

In any case the function leaves the table on the top of the + stack.

+
+
+

-luaL_Reg(3) -
-Roberto Ierusalimschy, - Luiz Henrique de Figueiredo, and - Waldemar Celes, Lua 5.1 Reference - Manual. -

-The luaL_register() manual page was written - by Sergey Bronnikov.

+

luaL_Reg(3)

+

Roberto Ierusalimschy, + Luiz Henrique de Figueiredo, and + Waldemar Celes, Lua 5.1 Reference + Manual.

+ +
+

+

The luaL_register() manual page was + written by Sergey Bronnikov.

+
+ blob - a1a68528e6fb2f377b51003ed8bdc3caacf09a77 blob + 2153a2b24020782dfef3b0dc0af940942c621e96 --- luaL_typename.3.html +++ luaL_typename.3.html @@ -2,6 +2,7 @@ + LUAL_TYPENAME(3) @@ -14,30 +15,39 @@
July 21, 2022
-

-luaL_typename — -
returns the name of the type of the value
-

-#include - <lauxlib.h> -
-const char * -
-luaL_typename(lua_State - *L, int - index); -

-luaL_typename() returns the name of the type - of the value at the given index. -

+

luaL_typename — + returns the name of the type of the value

+
+
+

+

#include + <lauxlib.h>

+

const char * +
+ luaL_typename(lua_State + *L, int index);

+
+
+

+

() + returns the name of the type of the value at the given index.

+
+
+

-Roberto Ierusalimschy, - Luiz Henrique de Figueiredo, and - Waldemar Celes, Lua 5.1 Reference - Manual. -

-The luaL_typename() manual page was written - by Sergey Bronnikov.

+

Roberto Ierusalimschy, + Luiz Henrique de Figueiredo, and + Waldemar Celes, Lua 5.1 Reference + Manual.

+ +
+

+

The luaL_typename() manual page was + written by Sergey Bronnikov.

+
+ blob - 8a9caf75d55a589df4e4131e53da4bed88bd9175 blob + 61ba9d2dccd26196bcfd88ff2747d0ccf4af3d5a --- luaL_typerror.3.html +++ luaL_typerror.3.html @@ -2,6 +2,7 @@ + LUAL_TYPERROR(3) @@ -14,41 +15,48 @@
July 21, 2022
-

-luaL_typerror — -
generates an error with a message
-

-#include - <lauxlib.h> -
-int -
-luaL_typerror(lua_State - *L, int - narg, const char - *tname); -

-luaL_typerror() generates an error with a - message like the following: -
-location: bad argument - narg to 'func' ( - tname expected, got rt) -
-where location is produced by luaL_where(3), func - is the name of the current function, and rt is the type name of the actual - argument. -

+

luaL_typerror — + generates an error with a message

+
+
+

+

#include + <lauxlib.h>

+

int +
+ luaL_typerror(lua_State + *L, int narg, + const char *tname);

+
+
+

+

() + generates an error with a message like the following:

+

: + bad argument narg to + + ( tname expected, got rt)

+

where location is produced by luaL_where(3), + func is the name of the current function, and rt is the type name of the + actual argument.

+
+
+

-luaL_where(3) -
-Roberto Ierusalimschy, - Luiz Henrique de Figueiredo, and - Waldemar Celes, Lua 5.1 Reference - Manual. -

-The luaL_typerror() manual page was written - by Sergey Bronnikov.

+

luaL_where(3)

+

Roberto Ierusalimschy, + Luiz Henrique de Figueiredo, and + Waldemar Celes, Lua 5.1 Reference + Manual.

+ +
+

+

The luaL_typerror() manual page was + written by Sergey Bronnikov.

+
+ blob - bc91cf9dc651279629d1fc66a926548599a140ad blob + dda541e22a88dab0e74fcded11ca23ee7f2a08f4 --- luaL_unref.3.html +++ luaL_unref.3.html @@ -2,6 +2,7 @@ + LUAL_UNREF(3) @@ -14,40 +15,47 @@
July 21, 2022
-

-luaL_unref — -
releases reference from the table
-

-#include - <lauxlib.h> -
-void -
-luaL_unref(lua_State - *L, int t, - int ref); -

-luaL_unref() releases reference - ref from the table at index - t (see - luaL_ref(3)). The entry is removed from the - table, so that the referred object can be collected. The reference ref is also - freed to be used again. -
-If ref is LUA_NOREF or - LUA_REFNIL, - luaL_unref does nothing. -

+

luaL_unref — + releases reference from the table

+
+
+

+

#include + <lauxlib.h>

+

void +
+ luaL_unref(lua_State + *L, int t, + int ref);

+
+
+

+

() + releases reference ref from the table at index + t (see luaL_ref(3)). The entry is + removed from the table, so that the referred object can be collected. The + reference ref is also freed to be used again.

+

If ref is LUA_NOREF or + LUA_REFNIL, luaL_unref does + nothing.

+
+
+

-luaL_ref(3) -
-Roberto Ierusalimschy, - Luiz Henrique de Figueiredo, and - Waldemar Celes, Lua 5.1 Reference - Manual. -

-The luaL_unref() manual page was written by - Sergey Bronnikov.

+

luaL_ref(3)

+

Roberto Ierusalimschy, + Luiz Henrique de Figueiredo, and + Waldemar Celes, Lua 5.1 Reference + Manual.

+ +
+

+

The luaL_unref() manual page was written + by Sergey Bronnikov.

+
+ blob - a1f7a9b11e38dd9714177983d379ba7fa9452740 blob + e63167d1eb24edf10927d4bd2a5a1ce9aa495f5f --- luaL_where.3.html +++ luaL_where.3.html @@ -2,6 +2,7 @@ + LUAL_WHERE(3) @@ -14,40 +15,46 @@
July 21, 2022
-

-luaL_where — -
pushes onto the stack a string identifying the - current position of the control
-

-#include - <lauxlib.h> -
-void -
-luaL_where(lua_State - *L, int - lvl); -

-luaL_where() pushes onto the stack a string - identifying the current position of the control at level - lvl in the call stack. Typically this string - has the following format: -
-chunkname:currentline: -
-Level 0 is the running function, level 1 is the function that called the running - function, etc. -
-This function is used to build a prefix for error messages. -

+

luaL_where — + pushes onto the stack a string identifying the current + position of the control

+
+
+

+

#include + <lauxlib.h>

+

void +
+ luaL_where(lua_State + *L, int lvl);

+
+
+

+

() + pushes onto the stack a string identifying the current position of the + control at level lvl in the call stack. Typically this + string has the following format:

+

:

+

Level 0 is the running function, level 1 is the function that + called the running function, etc.

+

This function is used to build a prefix for error messages.

+
+
+

-Roberto Ierusalimschy, - Luiz Henrique de Figueiredo, and - Waldemar Celes, Lua 5.1 Reference - Manual. -

-The luaL_where() manual page was written by - Sergey Bronnikov.

+

Roberto Ierusalimschy, + Luiz Henrique de Figueiredo, and + Waldemar Celes, Lua 5.1 Reference + Manual.

+ +
+

+

The luaL_where() manual page was written + by Sergey Bronnikov.

+
+ blob - 84d85ebb5fb7b598d80afe44ddd879e4fc4189a1 blob + 6e6c8ecf142af18fe02fdf18ee793c00e5a10ef5 --- lua_Alloc.3.html +++ lua_Alloc.3.html @@ -2,6 +2,7 @@ + LUA_ALLOC(3) @@ -14,84 +15,87 @@
July 21, 2022
-

-lua_Alloc — -
the type of the memory-allocation function used by - Lua states
-

-#include - <lua.h> -
-typedef void * -
-(*lua_Alloc)(void - *ud, void - *ptr, size_t - osize, size_t - nsize); -

-The type of the memory-allocation function used by Lua states. The allocator - function must provide a functionality similar to - realloc(3), but not exactly the same. Its - arguments are ud, an opaque pointer passed to - lua_newstate(3); - ptr, a pointer to the block being - allocated/reallocated/freed; osize, the - original size of the block; nsize, the new - size of the block. ptr is - NULL if and only if - osize is zero. When - nsize is not zero and - osize is zero, the allocator should behave - like malloc(3). When - nsize and - osize are not zero, the allocator behaves - like realloc(3). Lua assumes that the allocator - never fails when osize >= - nsize. -
-Here is a simple implementation for the allocator function. It is used in the - auxiliary library by luaL_newstate(3). -
-
-
-static void *l_alloc (void *ud, void *ptr, size_t osize, 
-                                           size_t nsize) { 
-  (void)ud;  (void)osize;  /* not used */ 
-  if (nsize == 0) { 
-    free(ptr); 
-    return NULL; 
-  } 
-  else 
-    return realloc(ptr, nsize); 
-}
-
+
+

+

lua_Allocthe + type of the memory-allocation function used by Lua states

+
+
+

+

#include + <lua.h>

+

typedef void * +
+ (*lua_Alloc)(void + *ud, void *ptr, + size_t osize, + size_t nsize);

+
+
+

+

The type of the memory-allocation function used by Lua states. The + allocator function must provide a functionality similar to + realloc(3), but not exactly the same. Its arguments are + ud, an opaque pointer passed to + lua_newstate(3); ptr, a pointer to + the block being allocated/reallocated/freed; osize, + the original size of the block; nsize, the new size of + the block. ptr is NULL if and + only if osize is zero. When + nsize is not zero and osize is + zero, the allocator should behave like malloc(3). When + nsize and osize are not zero, + the allocator behaves like realloc(3). Lua assumes that + the allocator never fails when osize >= + nsize.

+

Here is a simple implementation for the allocator function. It is + used in the auxiliary library by luaL_newstate(3).

+

+
+
static void *l_alloc (void *ud, void *ptr, size_t osize,
+                                           size_t nsize) {
+  (void)ud;  (void)osize;  /* not used */
+  if (nsize == 0) {
+    free(ptr);
+    return NULL;
+  }
+  else
+    return realloc(ptr, nsize);
+}
-
-This code assumes that free(NULL) has no effect and - that realloc(NULL, size) is equivalent to - malloc(size). ANSI C ensures both behaviors. -

has + no effect and that + is equivalent to + . + ANSI C ensures both behaviors.

+

+
+

-When nsize is zero, the allocator must return - NULL; if - osize is not zero, it should free the block - pointed to by ptr. When - nsize is not zero, the allocator returns - NULL if and only if it cannot fill the - request. -

-lua_newstate(3), - luaL_newstate(3) -
-Roberto Ierusalimschy, - Luiz Henrique de Figueiredo, and - Waldemar Celes, Lua 5.1 Reference - Manual. -

-The lua_Alloc() manual page was written by - Sergey Bronnikov.
+

lua_newstate(3), + luaL_newstate(3)

+

Roberto Ierusalimschy, + Luiz Henrique de Figueiredo, and + Waldemar Celes, Lua 5.1 Reference + Manual.

+ +
+

+

The lua_Alloc() manual page was written by + Sergey Bronnikov.

+
+
blob - 9edbe15877c63edb87e71d02d730f0bf04fcfc2c blob + 72f0eba1ec81fd24397b1d4d244c8cdf76462e55 --- lua_CFunction.3.html +++ lua_CFunction.3.html @@ -2,6 +2,7 @@ + LUA_CFUNCTION(3) @@ -14,63 +15,70 @@
July 13, 2022
-

-lua_CFunction — -
type for C functions
-

-#include - <lua.h> -
-typedef int * -
-lua_CFunction(lua_State - *L); -

-lua_CFunction() type for C functions. -
-In order to communicate properly with Lua, a C function must use the following - protocol, which defines the way parameters and results are passed: a C - function receives its arguments from Lua in its stack in direct order (the - first argument is pushed first). So, when the function starts, lua_gettop(L) - returns the number of arguments received by the function. The first argument - (if any) is at index 1 and its last argument is at index lua_gettop(L). To - return values to Lua, a C function just pushes them onto the stack, in direct - order (the first result is pushed first), and returns the number of results. - Any other value in the stack below the results will be properly discarded by - Lua. Like a Lua function, a C function called by Lua can also return many - results. -
-As an example, the following function receives a variable number of numerical - arguments and returns their average and sum: -
-
-
-static int foo (lua_State *L) { 
-  int n = lua_gettop(L);    /* number of arguments */ 
-  lua_Number sum = 0; 
-  int i; 
-  for (i = 1; i <= n; i++) { 
-    if (!lua_isnumber(L, i)) { 
-      lua_pushstring(L, "incorrect argument"); 
-      lua_error(L); 
-    } 
-    sum += lua_tonumber(L, i); 
-  } 
-  lua_pushnumber(L, sum/n);        /* first result */ 
-  lua_pushnumber(L, sum);         /* second result */ 
-  return 2;                   /* number of results */ 
-}
-
+
+

+

lua_CFunction — + type for C functions

+
+
+

+

#include + <lua.h>

+

typedef int * +
+ lua_CFunction(lua_State + *L);

+
+
+

+

() + type for C functions.

+

In order to communicate properly with Lua, a C function must use + the following protocol, which defines the way parameters and results are + passed: a C function receives its arguments from Lua in its stack in direct + order (the first argument is pushed first). So, when the function starts, + lua_gettop(L) returns the number of arguments received by the function. The + first argument (if any) is at index 1 and its last argument is at index + lua_gettop(L). To return values to Lua, a C function just pushes them onto + the stack, in direct order (the first result is pushed first), and returns + the number of results. Any other value in the stack below the results will + be properly discarded by Lua. Like a Lua function, a C function called by + Lua can also return many results.

+

As an example, the following function receives a variable number + of numerical arguments and returns their average and sum:

+

+
+
static int foo (lua_State *L) {
+  int n = lua_gettop(L);    /* number of arguments */
+  lua_Number sum = 0;
+  int i;
+  for (i = 1; i <= n; i++) {
+    if (!lua_isnumber(L, i)) {
+      lua_pushstring(L, "incorrect argument");
+      lua_error(L);
+    }
+    sum += lua_tonumber(L, i);
+  }
+  lua_pushnumber(L, sum/n);        /* first result */
+  lua_pushnumber(L, sum);         /* second result */
+  return 2;                   /* number of results */
+}
-

-Roberto Ierusalimschy, - Luiz Henrique de Figueiredo, and - Waldemar Celes, Lua 5.1 Reference - Manual. -

-The lua_CFunction() manual page was written - by Sergey Bronnikov.
+

Roberto Ierusalimschy, + Luiz Henrique de Figueiredo, and + Waldemar Celes, Lua 5.1 Reference + Manual.

+ +
+

+

The lua_CFunction() manual page was + written by Sergey Bronnikov.

+
+
blob - c6a92d9ace16e3474fb79a313faf7eb71259b166 blob + 12e6d456953c33a54945848ab31f1c19956dd894 --- lua_Debug.3.html +++ lua_Debug.3.html @@ -2,6 +2,7 @@ + LUA_DEBUG(3) @@ -14,99 +15,102 @@
July 19, 2022
-

-lua_Debug — -
structure used to carry different pieces of - information about an active function
-

-#include - <lua.h> -
-typedef struct lua_Debug; -

-lua_Debug() a structure used to carry - different pieces of information about an active function. - lua_getstack(3) fills only the private part of - this structure, for later use. To fill the other fields of - lua_Debug with useful information, call - lua_getinfo(3). -
-lua_Debug is defined as: -
-
-
-typedef struct lua_Debug { 
-        int event; 
-        const char *name;           /* (n) */ 
-        const char *namewhat;       /* (n) */ 
-        const char *what;           /* (S) */ 
-        const char *source;         /* (S) */ 
-        int currentline;            /* (l) */ 
-        int nups;                   /* (u) number of upvalues */ 
-        int linedefined;            /* (S) */ 
-        int lastlinedefined;        /* (S) */ 
-        char short_src[LUA_IDSIZE]; /* (S) */ 
-        /* private part */ 
-        other fields 
-} lua_Debug;
-
+
+

+

lua_Debug — + structure used to carry different pieces of information + about an active function

+
+
+

+

#include + <lua.h>

+

typedef struct lua_Debug;

+
+
+

+

() + a structure used to carry different pieces of information about an active + function. lua_getstack(3) fills only the private part of + this structure, for later use. To fill the other fields of + lua_Debug with useful information, call + lua_getinfo(3).

+

lua_Debug is defined as:

+
+
typedef struct lua_Debug {
+        int event;
+        const char *name;           /* (n) */
+        const char *namewhat;       /* (n) */
+        const char *what;           /* (S) */
+        const char *source;         /* (S) */
+        int currentline;            /* (l) */
+        int nups;                   /* (u) number of upvalues */
+        int linedefined;            /* (S) */
+        int lastlinedefined;        /* (S) */
+        char short_src[LUA_IDSIZE]; /* (S) */
+        /* private part */
+        other fields
+} lua_Debug;
-
-The fields of lua_Debug have the following - meaning: -
+

The fields of lua_Debug have the following + meaning:

+

-
source:
+
:
If the function was defined in a string, then source is that string. If the function was defined in a file, then source starts with a '@' followed by the file name.
-
short_src:
+
:
a "printable" version of source, to be used in error messages.
-
linedefined:
+
:
the line number where the definition of the function starts.
-
lastlinedefined:
+
:
the line number where the definition of the function ends.
-
what:
+
:
the string "Lua" if the function is a Lua function, "C" if it is a C function, "main" if it is the main part of a chunk, and "tail" if it was a function that did a tail call. In the latter case, Lua has no other information about the function.
-
currentline:
+
:
the current line where the given function is executing. When no line information is available, currentline is set to -1.
-
name:
+
:
a reasonable name for the given function. Because functions in Lua are first-class values, they do not have a fixed name: some functions can be the value of multiple global variables, while others can be stored only in - a table field. The lua_getinfo(3) function - checks how the function was called to find a suitable name. If it cannot - find a name, then name is set to - NULL.
-
namewhat:
+ a table field. The lua_getinfo(3) function checks how + the function was called to find a suitable name. If it cannot find a name, + then name is set to NULL. +
:
explains the name field. The value of namewhat can be "global", "local", "method", "field", "upvalue", or "" (the empty string), according to how the function was called. (Lua uses the empty string when no other option seems to apply.)
-
nups:
+
:
the number of upvalues of the function.
-

-lua_getinfo(3), - lua_getstack(3) -
-Roberto Ierusalimschy, - Luiz Henrique de Figueiredo, and - Waldemar Celes, Lua 5.1 Reference - Manual. -

-The lua_Debug() manual page was written by - Sergey Bronnikov.
+

lua_getinfo(3), + lua_getstack(3)

+

Roberto Ierusalimschy, + Luiz Henrique de Figueiredo, and + Waldemar Celes, Lua 5.1 Reference + Manual.

+ +
+

+

The lua_Debug() manual page was written by + Sergey Bronnikov.

+
+
blob - ffbed084881cddb186f5a67778649f1757416471 blob + 02a52282de11aea3c713493c0e96e05162b44d46 --- lua_Hook.3.html +++ lua_Hook.3.html @@ -2,6 +2,7 @@ + LUA_HOOK(3) @@ -14,50 +15,57 @@
July 19, 2022
-

-lua_Hook — -
type for debugging hook functions
-

-#include - <lua.h> -
-typedef void * -
-lua_Hook(lua_State - *L, lua_Debug - *ar); -

-lua_Hook() type for debugging hook functions. -
-Whenever a hook is called, its ar argument has its field event set to the - specific event that triggered the hook. Lua identifies these events with the - following constants: LUA_HOOKCALL, - LUA_HOOKRET, - LUA_HOOKTAILRET, - LUA_HOOKLINE, and - LUA_HOOKCOUNT. Moreover, for line events, - the field currentline is also set. To get the value of any other field in ar, - the hook must call lua_getinfo(3). For return - events, event can be LUA_HOOKRET, the - normal value, or LUA_HOOKTAILRET. In the - latter case, Lua is simulating a return from a function that did a tail call; - in this case, it is useless to call - lua_getinfo(3). -
-While Lua is running a hook, it disables other calls to hooks. Therefore, if a - hook calls back Lua to execute a function or a chunk, this execution occurs - without any calls to hooks. -

+

lua_Hooktype + for debugging hook functions

+
+
+

+

#include + <lua.h>

+

typedef void * +
+ lua_Hook(lua_State + *L, lua_Debug + *ar);

+
+
+

+

() + type for debugging hook functions.

+

Whenever a hook is called, its ar argument has its field event set + to the specific event that triggered the hook. Lua identifies these events + with the following constants: LUA_HOOKCALL, + LUA_HOOKRET, + LUA_HOOKTAILRET, + LUA_HOOKLINE, and + LUA_HOOKCOUNT. Moreover, for line events, the field + currentline is also set. To get the value of any other field in ar, the hook + must call lua_getinfo(3). For return events, event can be + LUA_HOOKRET, the normal value, or + LUA_HOOKTAILRET. In the latter case, Lua is + simulating a return from a function that did a tail call; in this case, it + is useless to call lua_getinfo(3).

+

While Lua is running a hook, it disables other calls to hooks. + Therefore, if a hook calls back Lua to execute a function or a chunk, this + execution occurs without any calls to hooks.

+
+
+

-lua_getinfo(3) -
-Roberto Ierusalimschy, - Luiz Henrique de Figueiredo, and - Waldemar Celes, Lua 5.1 Reference - Manual. -

-The lua_Hook() manual page was written by - Sergey Bronnikov.

+

lua_getinfo(3)

+

Roberto Ierusalimschy, + Luiz Henrique de Figueiredo, and + Waldemar Celes, Lua 5.1 Reference + Manual.

+ +
+

+

The lua_Hook() manual page was written by + Sergey Bronnikov.

+
+ blob - d0a48d99fe94f54a685632c093f8ff81b8dd65d0 blob + 9f40703fc5f827c407616eebfd0e6b155d467386 --- lua_Integer.3.html +++ lua_Integer.3.html @@ -2,6 +2,7 @@ + LUA_INTEGER(3) @@ -14,28 +15,38 @@
July 18, 2022
-

-lua_Integer — -
type to represent integral values
-

-#include - <lua.h> -
-typedef ptrdiff_t lua_Integer; -

-lua_Integer the type used by the Lua API to - represent integral values. By default it is a - ptrdiff_t, which is usually the largest - signed integral type the machine handles “comfortably”. -

+

lua_Integertype + to represent integral values

+
+
+

+

#include + <lua.h>

+

typedef ptrdiff_t lua_Integer;

+
+
+

+

lua_Integer the type used by the Lua API to + represent integral values. By default it is a + ptrdiff_t, which is usually the largest signed + integral type the machine handles "comfortably".

+
+
+

-Roberto Ierusalimschy, - Luiz Henrique de Figueiredo, and - Waldemar Celes, Lua 5.1 Reference - Manual. -

-The lua_Integer() manual page was written by - Sergey Bronnikov.

+

Roberto Ierusalimschy, + Luiz Henrique de Figueiredo, and + Waldemar Celes, Lua 5.1 Reference + Manual.

+ +
+

+

The lua_Integer() manual page was written + by Sergey Bronnikov.

+
+ blob - 48df890f4eda76ea6d566f2e2dec2f392840f783 blob + 56a52f3b179a8cccfea9ad48f4de101f36a624a3 --- lua_Number.3.html +++ lua_Number.3.html @@ -2,6 +2,7 @@ + LUA_NUMBER(3) @@ -14,29 +15,39 @@
July 18, 2022
-

-lua_Number — -
type of numbers in Lua
-

-#include - <lua.h> -
-typedef double lua_Number; -

-The type of numbers in Lua. By default, it is double, but that can be changed in - <luaconf.h>. -
-Through the configuration file you can change Lua to operate with another type - for numbers (e.g., float or long). -

+

lua_Numbertype + of numbers in Lua

+
+
+

+

#include + <lua.h>

+

typedef double lua_Number;

+
+
+

+

The type of numbers in Lua. By default, it is double, but that can + be changed in + <luaconf.h>.

+

Through the configuration file you can change Lua to operate with + another type for numbers (e.g., float or long).

+
+
+

-Roberto Ierusalimschy, - Luiz Henrique de Figueiredo, and - Waldemar Celes, Lua 5.1 Reference - Manual. -

-The lua_Number manual page was written by - Sergey Bronnikov.

+

Roberto Ierusalimschy, + Luiz Henrique de Figueiredo, and + Waldemar Celes, Lua 5.1 Reference + Manual.

+ +
+

+

The lua_Number manual page was written by + Sergey Bronnikov.

+
+ blob - 598abfbb97ff74396685ab90f1cbd71d24ca4b6f blob + 747ae369a4b14cb646cb56e26c3c0ec9b140a0ce --- lua_Reader.3.html +++ lua_Reader.3.html @@ -2,6 +2,7 @@ + LUA_READER(3) @@ -14,41 +15,49 @@
July 15, 2022
-

-lua_Reader — -
reader function used by - lua_load(3)
-

-#include - <lua.h> -
-typedef const char * -
-(*lua_Reader)(lua_State - *L, void - *data, size_t - *size); -

-The reader function lua_Reader() used by - lua_load(3). Every time it needs another piece of - the chunk, lua_load(3) calls the reader, passing - along its data parameter. The reader must return a pointer to a block of - memory with a new piece of the chunk and set size to the block size. The block - must exist until the reader function is called again. To signal the end of the - chunk, the reader must return NULL or set - size to zero. The reader function may return pieces of any size greater than - zero. -

+

lua_Reader — + reader function used by + lua_load(3)

+
+
+

+

#include + <lua.h>

+

typedef const char * +
+ (*lua_Reader)(lua_State + *L, void *data, + size_t *size);

+
+
+

+

The reader function + () + used by lua_load(3). Every time it needs another piece of + the chunk, lua_load(3) calls the reader, passing along its + data parameter. The reader must return a pointer to a block of memory with a + new piece of the chunk and set size to the block size. The block must exist + until the reader function is called again. To signal the end of the chunk, + the reader must return NULL or set size to zero. The + reader function may return pieces of any size greater than zero.

+
+
+

-lua_load(3) -
-Roberto Ierusalimschy, - Luiz Henrique de Figueiredo, and - Waldemar Celes, Lua 5.1 Reference - Manual. -

-The lua_Reader() manual page was written by - Sergey Bronnikov.

+

lua_load(3)

+

Roberto Ierusalimschy, + Luiz Henrique de Figueiredo, and + Waldemar Celes, Lua 5.1 Reference + Manual.

+ +
+

+

The lua_Reader() manual page was written + by Sergey Bronnikov.

+
+ blob - 880fcd474afb284659ac0fbf6debbd8a8707e75b blob + 57bb4929baeb2ca9cfe91226f64c761c6f7c6101 --- lua_State.3.html +++ lua_State.3.html @@ -2,6 +2,7 @@ + LUA_STATE(3) @@ -14,33 +15,41 @@
July 15, 2022
-

-lua_State — -
opaque structure that keeps the whole state of a Lua - interpreter
-

-#include - <lua.h> -
-typedef struct lua_State lua_State; -

-lua_State opaque structure that keeps the whole - state of a Lua interpreter. The Lua library is fully reentrant: it has no - global variables. All information about a state is kept in this structure. A - pointer to this state must be passed as the first argument to every function - in the library, except to lua_newstate(3), which - creates a Lua state from scratch. -

+

lua_Stateopaque + structure that keeps the whole state of a Lua interpreter

+
+
+

+

#include + <lua.h>

+

typedef struct lua_State lua_State;

+
+
+

+

lua_State opaque structure that keeps the + whole state of a Lua interpreter. The Lua library is fully reentrant: it has + no global variables. All information about a state is kept in this + structure. A pointer to this state must be passed as the first argument to + every function in the library, except to lua_newstate(3), + which creates a Lua state from scratch.

+
+
+

-lua_newstate(3) -
-Roberto Ierusalimschy, - Luiz Henrique de Figueiredo, and - Waldemar Celes, Lua 5.1 Reference - Manual. -

-The lua_State manual page was written by Sergey - Bronnikov.

+

lua_newstate(3)

+

Roberto Ierusalimschy, + Luiz Henrique de Figueiredo, and + Waldemar Celes, Lua 5.1 Reference + Manual.

+ +
+

+

The lua_State manual page was written by + Sergey Bronnikov.

+
+ blob - d95d6256293d77fec2803cf89e3ab3ebbfbbbdd0 blob + fd344fc364c88e7190344b9e59258c94fd09a731 --- lua_Writer.3.html +++ lua_Writer.3.html @@ -2,6 +2,7 @@ + LUA_WRITER(3) @@ -14,42 +15,52 @@
July 14, 2022
-

-lua_Writer — -
type of the writer function used by - lua_dump(3)
-

-#include - <lua.h> -
-typedef int * -
-lua_Writer(lua_State - *L, const void* - p, size_t - sz, void* - ud); -

-lua_Writer type of the writer function used by - lua_dump(3). Every time it produces another piece - of chunk, lua_dump(3) calls the writer, passing - along the buffer to be written (p), its size - (sz), and the data parameter supplied to - lua_dump(3). -

+

lua_Writertype + of the writer function used by lua_dump(3)

+
+
+

+

#include + <lua.h>

+

typedef int * +
+ lua_Writer(lua_State + *L, const void* p, + size_t sz, + void* ud);

+
+
+

+

lua_Writer type of the writer function used + by lua_dump(3). Every time it produces another piece of + chunk, lua_dump(3) calls the writer, passing along the + buffer to be written (p), its size + (sz), and the data parameter supplied to + lua_dump(3).

+
+
+

-The writer returns an error code: 0 means no errors; any other value means an - error and stops lua_dump(3) from calling the - writer again. -

lua_dump(3) from calling + the writer again.

+

+
+

-Roberto Ierusalimschy, - Luiz Henrique de Figueiredo, and - Waldemar Celes, Lua 5.1 Reference - Manual. -

-The lua_Writer manual page was written by - Sergey Bronnikov.

+

Roberto Ierusalimschy, + Luiz Henrique de Figueiredo, and + Waldemar Celes, Lua 5.1 Reference + Manual.

+ +
+

+

The lua_Writer manual page was written by + Sergey Bronnikov.

+
+ blob - b6dc11ee668a7301759f5c8b0170798b2073a4ab blob + a7e37095257514449f0e59f05c53e29357562835 --- lua_atpanic.3.html +++ lua_atpanic.3.html @@ -2,6 +2,7 @@ + LUA_ATPANIC(3) @@ -14,39 +15,47 @@
July 18, 2022
-

-lua_atpanic — -
sets a new panic function and returns the old - one
-

-#include - <lua.h> -
-lua_CFunction -
-lua_atpanic(lua_State - *L, - lua_CFunction - panicf); -

-lua_atpanic() sets a new panic function and - returns the old one. -
-If an error happens outside any protected environment, Lua calls a panic - function and then calls exit(EXIT_FAILURE), thus - exiting the host application. Your panic function can avoid this exit by never - returning (e.g., doing a long jump). -
-The panic function can access the error message at the top of the stack. -

+

lua_atpanicsets + a new panic function and returns the old one

+
+
+

+

#include + <lua.h>

+

lua_CFunction +
+ lua_atpanic(lua_State + *L, lua_CFunction + panicf);

+
+
+

+

() + sets a new panic function and returns the old one.

+

If an error happens outside any protected + environment, Lua calls a panic function and then calls + , + thus exiting the host application. Your panic function can avoid this exit + by never returning (e.g., doing a long jump).

+

The panic function can access the error message at the top of the + stack.

+
+
+

-Roberto Ierusalimschy, - Luiz Henrique de Figueiredo, and - Waldemar Celes, Lua 5.1 Reference - Manual. -

-The lua_atpanic() manual page was written by - Sergey Bronnikov.

+

Roberto Ierusalimschy, + Luiz Henrique de Figueiredo, and + Waldemar Celes, Lua 5.1 Reference + Manual.

+ +
+

+

The lua_atpanic() manual page was written + by Sergey Bronnikov.

+
+ blob - 47a768503ae52150c4798545917265972bf38249 blob + 1e68c2912253b041a2899cea0e07a14c6a7f8aec --- lua_call.3.html +++ lua_call.3.html @@ -2,6 +2,7 @@ + LUA_CALL(3) @@ -14,73 +15,76 @@
July 14, 2022
-

-lua_call — -
calls a function
-

-#include - <lua.h> -
-void -
-lua_call(lua_State - *L, int - nargs, int - nresults); -

-lua_call() calls a function. -
-To call a function you must use the following protocol: first, the function to - be called is pushed onto the stack; then, the arguments to the function are - pushed in direct order; that is, the first argument is pushed first. Finally - you call lua_call; - nargs is the number of arguments that you - pushed onto the stack. All arguments and the function value are popped from - the stack when the function is called. The function results are pushed onto - the stack when the function returns. The number of results is adjusted to - nresults, unless nresults is LUA_MULTRET. - In this case, all results from the function are pushed. Lua takes care that - the returned values fit into the stack space. The function results are pushed - onto the stack in direct order (the first result is pushed first), so that - after the call the last result is on the top of the stack. -
-Any error inside the called function is propagated upwards (with a longjmp). -
-The following example shows how the host program can do the equivalent to this - Lua code: -
-
-
-a = f("how", t.x, 14)
-
+
+

+

lua_callcalls a + function

+
+
+

+

#include + <lua.h>

+

void +
+ lua_call(lua_State + *L, int nargs, + int nresults);

+
+
+

+

() + calls a function.

+

To call a function you must use the following protocol: first, the + function to be called is pushed onto the stack; then, the arguments to the + function are pushed in direct order; that is, the first argument is pushed + first. Finally you call lua_call; + nargs is the number of arguments that you pushed onto + the stack. All arguments and the function value are popped from the stack + when the function is called. The function results are pushed onto the stack + when the function returns. The number of results is adjusted to nresults, + unless nresults is LUA_MULTRET. In this case, all + results from the function are pushed. Lua takes care that the returned + values fit into the stack space. The function results are pushed onto the + stack in direct order (the first result is pushed first), so that after the + call the last result is on the top of the stack.

+

Any error inside the called function is propagated upwards (with a + longjmp).

+

The following example shows how the host program can do the + equivalent to this Lua code:

+

+
+
a = f("how", t.x, 14)
-
-Here it is in C: -
-
-
-lua_getfield(L, LUA_GLOBALSINDEX, "f"); /* function to be called */ 
-lua_pushstring(L, "how");                        /* 1st argument */ 
-lua_getfield(L, LUA_GLOBALSINDEX, "t");   /* table to be indexed */ 
-lua_getfield(L, -1, "x");        /* push result of t.x (2nd arg) */ 
-lua_remove(L, -2);                  /* remove 't' from the stack */ 
-lua_pushinteger(L, 14);                          /* 3rd argument */ 
-lua_call(L, 3, 1);     /* call 'f' with 3 arguments and 1 result */ 
-lua_setfield(L, LUA_GLOBALSINDEX, "a");        /* set global 'a' */
-
+

Here it is in C:

+

+
+
lua_getfield(L, LUA_GLOBALSINDEX, "f"); /* function to be called */
+lua_pushstring(L, "how");                        /* 1st argument */
+lua_getfield(L, LUA_GLOBALSINDEX, "t");   /* table to be indexed */
+lua_getfield(L, -1, "x");        /* push result of t.x (2nd arg) */
+lua_remove(L, -2);                  /* remove 't' from the stack */
+lua_pushinteger(L, 14);                          /* 3rd argument */
+lua_call(L, 3, 1);     /* call 'f' with 3 arguments and 1 result */
+lua_setfield(L, LUA_GLOBALSINDEX, "a");        /* set global 'a' */
-
-Note that the code above is "balanced": at its end, the stack is back - to its original configuration. This is considered good programming practice. -

-Roberto Ierusalimschy, - Luiz Henrique de Figueiredo, and - Waldemar Celes, Lua 5.1 Reference - Manual. -

-The lua_call() manual page was written by - Sergey Bronnikov.
+

Roberto Ierusalimschy, + Luiz Henrique de Figueiredo, and + Waldemar Celes, Lua 5.1 Reference + Manual.

+ +
+

+

The lua_call() manual page was written by + Sergey Bronnikov.

+
+
blob - a7fdebeb02aba577bb93d9d31aa6f8d0cea89eb4 blob + 929e777d9c6ccd6a0f074700eaddc4bd722e4ba5 --- lua_checkstack.3.html +++ lua_checkstack.3.html @@ -2,6 +2,7 @@ + LUA_CHECKSTACK(3) @@ -14,33 +15,43 @@
July 19, 2022
-

-lua_checkstack — -
ensures that there are at least extra free stack - slots in the stack
-

-#include - <lua.h> -
-int -
-lua_checkstack(lua_State - *L, int - extra); -

-lua_checkstack() ensures that there are at - least extra free stack slots in the stack. It returns false if it cannot grow - the stack to that size. This function never shrinks the stack; if the stack is - already larger than the new size, it is left unchanged. -

+

lua_checkstack — + ensures that there are at least extra free stack slots in + the stack

+
+
+

+

#include + <lua.h>

+

int +
+ lua_checkstack(lua_State + *L, int extra);

+
+
+

+

() + ensures that there are at least extra free stack slots in the stack. It + returns false if it cannot grow the stack to that size. This function never + shrinks the stack; if the stack is already larger than the new size, it is + left unchanged.

+
+
+

-Roberto Ierusalimschy, - Luiz Henrique de Figueiredo, and - Waldemar Celes, Lua 5.1 Reference - Manual. -

-The lua_checkstack() manual page was written - by Sergey Bronnikov.

+

Roberto Ierusalimschy, + Luiz Henrique de Figueiredo, and + Waldemar Celes, Lua 5.1 Reference + Manual.

+ +
+

+

The lua_checkstack() manual page was + written by Sergey Bronnikov.

+
+ blob - 68b1806d2df96c352c14b6d51ab16b410543f829 blob + 62e5a9ce793f747129ad2923ea40d0225fbfe3d1 --- lua_close.3.html +++ lua_close.3.html @@ -2,6 +2,7 @@ + LUA_CLOSE(3) @@ -14,32 +15,43 @@
July 14, 2022
-

-lua_close — -
ensures that there are at least extra free stack - slots in the stack
-

-#include - <lua.h> -
-void -
-lua_close(lua_State - *L); -

-lua_close() ensures that there are at least - extra free stack slots in the stack. It returns false if it cannot grow the - stack to that size. This function never shrinks the stack; if the stack is - already larger than the new size, it is left unchanged. -

+

lua_close — + ensures that there are at least extra free stack slots in + the stack

+
+
+

+

#include + <lua.h>

+

void +
+ lua_close(lua_State + *L);

+
+
+

+

() + ensures that there are at least extra free stack slots in the stack. It + returns false if it cannot grow the stack to that size. This function never + shrinks the stack; if the stack is already larger than the new size, it is + left unchanged.

+
+
+

-Roberto Ierusalimschy, - Luiz Henrique de Figueiredo, and - Waldemar Celes, Lua 5.1 Reference - Manual. -

-The lua_close() manual page was written by - Sergey Bronnikov.

+

Roberto Ierusalimschy, + Luiz Henrique de Figueiredo, and + Waldemar Celes, Lua 5.1 Reference + Manual.

+ +
+

+

The lua_close() manual page was written by + Sergey Bronnikov.

+
+ blob - 947925929b0a9197c1ac852e5157cea78fc20288 blob + f9393b170e07716ee775a5540bfedaae19ef7647 --- lua_concat.3.html +++ lua_concat.3.html @@ -2,6 +2,7 @@ + LUA_CONCAT(3) @@ -14,38 +15,49 @@
July 14, 2022
-

-lua_concat — -
concatenates the values at the top of the stack, pops - them, and leaves the result at the top
-

-#include - <lua.h> -
-void -
-lua_concat(lua_State - *L, int - n); -

-lua_concat() concatenates the - n values at the top of the stack, pops them, - and leaves the result at the top. Concatenation is performed following the - usual semantics of Lua. -

+

lua_concat — + concatenates the values at the top of the stack, pops them, + and leaves the result at the top

+
+
+

+

#include + <lua.h>

+

void +
+ lua_concat(lua_State + *L, int n);

+
+
+

+

() + concatenates the n values at the top of the stack, + pops them, and leaves the result at the top. Concatenation is performed + following the usual semantics of Lua.

+
+
+

-If n is 1, the result is the single value on - the stack (that is, the function does nothing); if - n is 0, the result is the empty string. -

-Roberto Ierusalimschy, - Luiz Henrique de Figueiredo, and - Waldemar Celes, Lua 5.1 Reference - Manual. -

-The lua_concat() manual page was written by - Sergey Bronnikov.

+

Roberto Ierusalimschy, + Luiz Henrique de Figueiredo, and + Waldemar Celes, Lua 5.1 Reference + Manual.

+ +
+

+

The lua_concat() manual page was written + by Sergey Bronnikov.

+
+ blob - 458443985b920ff03ed8b111397796ec2998defe blob + 3a1c4896384e4c4836f1ae28e2be031f0f2d1dab --- lua_cpcall.3.html +++ lua_cpcall.3.html @@ -2,6 +2,7 @@ + LUA_CPCALL(3) @@ -14,43 +15,53 @@
July 14, 2022
-

-lua_cpcall — -
calls the C function in protected mode
-

-#include - <lua.h> -
-int -
-lua_cpcall(lua_State - *L, - lua_CFunction - func, void - *ud); -

-lua_cpcall() calls the C function - func in protected mode. - func starts with only one element in its - stack, a light userdata containing ud. -

+

lua_cpcallcalls + the C function in protected mode

+
+
+

+

#include + <lua.h>

+

int +
+ lua_cpcall(lua_State + *L, lua_CFunction + func, void + *ud);

+
+
+

+

() + calls the C function func in protected mode. + func starts with only one element in its stack, a + light userdata containing ud.

+
+
+

-In case of errors, lua_cpcall() returns the - same error codes as lua_pcall(3), plus the error - object on the top of the stack; otherwise, it returns zero, and does not - change the stack. All values returned by func - are discarded. -

lua_pcall(3), plus the error + object on the top of the stack; otherwise, it returns zero, and does not + change the stack. All values returned by func are + discarded.

+

+
+

-lua_pcall(3) -
-Roberto Ierusalimschy, - Luiz Henrique de Figueiredo, and - Waldemar Celes, Lua 5.1 Reference - Manual. -

-The lua_cpcall() manual page was written by - Sergey Bronnikov.

+

lua_pcall(3)

+

Roberto Ierusalimschy, + Luiz Henrique de Figueiredo, and + Waldemar Celes, Lua 5.1 Reference + Manual.

+ +
+

+

The lua_cpcall() manual page was written + by Sergey Bronnikov.

+
+ blob - d5d73720b906c1ce9393fd47c0d5eb7c7faac4c4 blob + bb6167570df3c6d16f206373266d204c57999192 --- lua_createtable.3.html +++ lua_createtable.3.html @@ -2,6 +2,7 @@ + LUA_CREATETABLE(3) @@ -14,39 +15,46 @@
July 14, 2022
-

-lua_createtable — -
creates a new empty table and pushes it onto the - stack
-

-#include - <lua.h> -
-void -
-lua_createtable(lua_State - *L, int - narr, int - nrec); -

-lua_createtable() creates a new empty table - and pushes it onto the stack. The new table has space pre-allocated for - narr array elements and - nrec non-array elements. This pre-allocation - is useful when you know exactly how many elements the table will have. - Otherwise you can use the function - lua_newtable(3). -

+

lua_createtable — + creates a new empty table and pushes it onto the + stack

+
+
+

+

#include + <lua.h>

+

void +
+ lua_createtable(lua_State + *L, int narr, + int nrec);

+
+
+

+

() + creates a new empty table and pushes it onto the stack. The new table has + space pre-allocated for narr array elements and + nrec non-array elements. This pre-allocation is useful + when you know exactly how many elements the table will have. Otherwise you + can use the function lua_newtable(3).

+
+
+

-lua_newtable(3) -
-Roberto Ierusalimschy, - Luiz Henrique de Figueiredo, and - Waldemar Celes, Lua 5.1 Reference - Manual. -

-The lua_createtable() manual page was written - by Sergey Bronnikov.

+

lua_newtable(3)

+

Roberto Ierusalimschy, + Luiz Henrique de Figueiredo, and + Waldemar Celes, Lua 5.1 Reference + Manual.

+ +
+

+

The lua_createtable() manual page was + written by Sergey Bronnikov.

+
+ blob - fc19a34767ec9b68b80e9c120804325fa2a7f170 blob + 62891e9d4699e8784afde19914ac5d47a0a9f8cd --- lua_dump.3.html +++ lua_dump.3.html @@ -2,6 +2,7 @@ + LUA_DUMP(3) @@ -14,43 +15,53 @@
July 14, 2022
-

-lua_dump — -
dumps a function as a binary chunk
-

-#include - <lua.h> -
-int -
-lua_dump(lua_State - *L, lua_Writer - writer, void - *data); -

-lua_dump() dumps a function as a binary - chunk. Receives a Lua function on the top of the stack and produces a binary - chunk that, if loaded again, results in a function equivalent to the one - dumped. As it produces parts of the chunk, - lua_dump() calls function writer (see - lua_Writer(3)) with the given data to write them. -
-This function does not pop the Lua function from the stack. -

+

lua_dumpdumps a + function as a binary chunk

+
+
+

+

#include + <lua.h>

+

int +
+ lua_dump(lua_State + *L, lua_Writer + writer, void + *data);

+
+
+

+

() + dumps a function as a binary chunk. Receives a Lua function on the top of + the stack and produces a binary chunk that, if loaded again, results in a + function equivalent to the one dumped. As it produces parts of the chunk, + lua_dump() calls function writer (see + lua_Writer(3)) with the given data to write them.

+

This function does not pop the Lua function from the stack.

+
+
+

-The value returned is the error code returned by the last call to the writer; 0 - means no errors. -

-lua_Writer(3) -
-Roberto Ierusalimschy, - Luiz Henrique de Figueiredo, and - Waldemar Celes, Lua 5.1 Reference - Manual. -

-The lua_dump() manual page was written by - Sergey Bronnikov.

+

lua_Writer(3)

+

Roberto Ierusalimschy, + Luiz Henrique de Figueiredo, and + Waldemar Celes, Lua 5.1 Reference + Manual.

+ +
+

+

The lua_dump() manual page was written by + Sergey Bronnikov.

+
+ blob - de32c2c76b8f9e24e6098aee55789e869522ef8c blob + ea10ffea4e5bc78698ac324684feff0da539f30a --- lua_equal.3.html +++ lua_equal.3.html @@ -2,6 +2,7 @@ + LUA_EQUAL(3) @@ -14,38 +15,49 @@
July 14, 2022
-

-lua_equal — -
compare two values for equality
-

-#include - <lua.h> -
-int -
-lua_equal(lua_State - *L, int - index1, int - index2); -

-lua_equal() -

+

lua_equal — + compare two values for equality

+
+
+

+

#include + <lua.h>

+

int +
+ lua_equal(lua_State + *L, int index1, + int index2);

+
+
+

+

()

+
+
+

-Returns 1 if the two values in acceptable indices - index1 and - index2 are equal, following the semantics of - the Lua == operator (that is, may call - metamethods). Otherwise returns 0. Also returns 0 if any of the indices is non - valid. -

operator + (that is, may call metamethods). Otherwise returns 0. Also returns 0 if any + of the indices is non valid.

+

+
+

-Roberto Ierusalimschy, - Luiz Henrique de Figueiredo, and - Waldemar Celes, Lua 5.1 Reference - Manual. -

-The lua_equal() manual page was written by - Sergey Bronnikov.

+

Roberto Ierusalimschy, + Luiz Henrique de Figueiredo, and + Waldemar Celes, Lua 5.1 Reference + Manual.

+ +
+

+

The lua_equal() manual page was written by + Sergey Bronnikov.

+
+ blob - 215c608ad3ec3471a6abd3759b6eca24a92f49f3 blob + 50232b0745cde7d79741e76e67f277527acafe1a --- lua_error.3.html +++ lua_error.3.html @@ -2,6 +2,7 @@ + LUA_ERROR(3) @@ -14,35 +15,46 @@
July 14, 2022
-

-lua_error — -
generates a Lua error
-

-#include - <lua.h> -
-int -
-lua_error(lua_State - *L); -

-lua_error() generates a Lua error. The error - message (which can actually be a Lua value of any type) must be on the stack - top. -

+

lua_error — + generates a Lua error

+
+
+

+

#include + <lua.h>

+

int +
+ lua_error(lua_State + *L);

+
+
+

+

() + generates a Lua error. The error message (which can actually be a Lua value + of any type) must be on the stack top.

+
+
+

-This function does a long jump, and therefore never returns. -

-luaL_error(3) -
-Roberto Ierusalimschy, - Luiz Henrique de Figueiredo, and - Waldemar Celes, Lua 5.1 Reference - Manual. -

-The luaL_error() manual page was written by - Sergey Bronnikov.

+

luaL_error(3)

+

Roberto Ierusalimschy, + Luiz Henrique de Figueiredo, and + Waldemar Celes, Lua 5.1 Reference + Manual.

+ +
+

+

The luaL_error() manual page was written + by Sergey Bronnikov.

+
+ blob - de4074efa11f156d5d7f4f1ff62ea451706dccbb blob + e58dc3b0473b054ffebd9edfe6fcd9a4438388f9 --- lua_gc.3.html +++ lua_gc.3.html @@ -2,6 +2,7 @@ + LUA_GC(3) @@ -14,61 +15,70 @@
July 14, 2022
-

-lua_gc — -
controls the garbage collector
-

-#include - <lua.h> -
-int -
-lua_gc(lua_State - *L, int - what, int - data); -

-lua_gc() controls the garbage collector. -
-This function performs several tasks, according to the value of the parameter - what: -
+
+

+

lua_gccontrols + the garbage collector

+
+
+

+

#include + <lua.h>

+

int +
+ lua_gc(lua_State + *L, int what, + int data);

+
+
+

+

() + controls the garbage collector.

+

This function performs several tasks, according to the value of + the parameter what:

+

-
:
+
:
stops the garbage collector.
-
:
+
:
restarts the garbage collector.
-
:
+
:
performs a full garbage-collection cycle.
-
:
+
:
returns the current amount of memory (in Kbytes) in use by Lua.
-
:
+
:
returns the remainder of dividing the current amount of bytes of memory in use by Lua by 1024.
-
:
+
:
performs an incremental step of garbage collection. The step "size" is controlled by data (larger values mean more steps) in a non-specified way. If you want to control the step size you must experimentally tune the value of data. The function returns 1 if the step finished a garbage-collection cycle.
-
:
+
:
sets data as the new value for the pause of the collector. The function returns the previous value of the pause.
-
:
+
:
sets data as the new value for the step multiplier of the collector. The function returns the previous value of the step multiplier.
-

-Roberto Ierusalimschy, - Luiz Henrique de Figueiredo, and - Waldemar Celes, Lua 5.1 Reference - Manual. -

-The lua_gc() manual page was written by - Sergey Bronnikov.
+

Roberto Ierusalimschy, + Luiz Henrique de Figueiredo, and + Waldemar Celes, Lua 5.1 Reference + Manual.

+ +
+

+

The lua_gc() manual page was written by + Sergey Bronnikov.

+
+ blob - ebd44b4d4f039b6862f6a3c03fff20bc5e4e09da blob + e8c568570387c7b7832e520f7b3fc733ccea2a61 --- lua_getallocf.3.html +++ lua_getallocf.3.html @@ -2,6 +2,7 @@ + LUA_GETALLOCF(3) @@ -14,39 +15,48 @@
July 18, 2022
-

-lua_getallocf — -
returns the memory-allocation function of a given - state
-

-#include - <lua.h> -
-lua_Alloc -
-lua_getallocf(lua_State - *L, void - **ud); -

-lua_getallocf() returns the memory-allocation - function of a given state. -

+

lua_getallocf — + returns the memory-allocation function of a given + state

+
+
+

+

#include + <lua.h>

+

lua_Alloc +
+ lua_getallocf(lua_State + *L, void **ud);

+
+
+

+

() + returns the memory-allocation function of a given state.

+
+
+

-If ud is not - NULL, Lua stores in - *ud the opaque pointer passed to - lua_newstate(3). -

lua_newstate(3).

+

+
+

-lua_newstate(3) -
-Roberto Ierusalimschy, - Luiz Henrique de Figueiredo, and - Waldemar Celes, Lua 5.1 Reference - Manual. -

-The lua_getallocf() manual page was written - by Sergey Bronnikov.

+

lua_newstate(3)

+

Roberto Ierusalimschy, + Luiz Henrique de Figueiredo, and + Waldemar Celes, Lua 5.1 Reference + Manual.

+ +
+

+

The lua_getallocf() manual page was + written by Sergey Bronnikov.

+
+ blob - 4aed2ea83f0217c18d85dfbb9e2d699d4a927fce blob + d2909e8f521e164c71e08c0875793596018fb20b --- lua_getfenv.3.html +++ lua_getfenv.3.html @@ -2,6 +2,7 @@ + LUA_GETFENV(3) @@ -14,31 +15,41 @@
July 14, 2022
-

-lua_getfenv — -
pushes onto the stack the environment table of the - value at the given index
-

-#include - <lua.h> -
-void -
-lua_getfenv(lua_State - *L, int - index); -

-lua_getfenv() pushes onto the stack the - environment table of the value at the given index. -

+

lua_getfenv — + pushes onto the stack the environment table of the value at + the given index

+
+
+

+

#include + <lua.h>

+

void +
+ lua_getfenv(lua_State + *L, int index);

+
+
+

+

() + pushes onto the stack the environment table of the value at the given + index.

+
+
+

-Roberto Ierusalimschy, - Luiz Henrique de Figueiredo, and - Waldemar Celes, Lua 5.1 Reference - Manual. -

-The lua_getfenv() manual page was written by - Sergey Bronnikov.

+

Roberto Ierusalimschy, + Luiz Henrique de Figueiredo, and + Waldemar Celes, Lua 5.1 Reference + Manual.

+ +
+

+

The lua_getfenv() manual page was written + by Sergey Bronnikov.

+
+ blob - 2d975a9f8311db2f9f4ead996dd494df4bb4b14f blob + 179d275a3332e1392c512a3c8e5f2ef16bbc92a2 --- lua_getfield.3.html +++ lua_getfield.3.html @@ -2,6 +2,7 @@ + LUA_GETFIELD(3) @@ -14,33 +15,43 @@
July 14, 2022
-

-lua_getfield — -
pushes onto the stack the value t[k], where t is the - value at the given valid index
-

-#include - <lua.h> -
-void -
-lua_getfield(lua_State - *L, int - index, const - char *k); -

-lua_getfield() pushes onto the stack the - value t[k], where t is the value at the given valid index. As in Lua, this - function may trigger a metamethod for the “index” event. -

+

lua_getfield — + pushes onto the stack the value t[k], where t is the value + at the given valid index

+
+
+

+

#include + <lua.h>

+

void +
+ lua_getfield(lua_State + *L, int index, + const char *k);

+
+
+

+

() + pushes onto the stack the value t[k], where t is the value at the given + valid index. As in Lua, this function may trigger a metamethod for the + "index" event.

+
+
+

-Roberto Ierusalimschy, - Luiz Henrique de Figueiredo, and - Waldemar Celes, Lua 5.1 Reference - Manual. -

-The lua_getfield() manual page was written by - Sergey Bronnikov.

+

Roberto Ierusalimschy, + Luiz Henrique de Figueiredo, and + Waldemar Celes, Lua 5.1 Reference + Manual.

+ +
+

+

The lua_getfield() manual page was written + by Sergey Bronnikov.

+
+ blob - 1f8ff9f72b36b66f8bb553fedcad0017833d1bdd blob + 857744a7d760dad5a8e006022cbe701a6b704169 --- lua_getglobal.3.html +++ lua_getglobal.3.html @@ -2,6 +2,7 @@ + LUA_GETGLOBAL(3) @@ -14,34 +15,44 @@
July 14, 2022
-

-lua_getglobal — -
pushes onto the stack the value of the global - name
-

-#include - <lua.h> -
-void -
-lua_getglobal(lua_State - *L, const char - *name); -

-lua_getglobal() pushes onto the stack the - value of the global name. It is defined as a macro: -
-#define lua_getglobal(L,s) lua_getfield(L, - LUA_GLOBALSINDEX, s) -

+

lua_getglobal — + pushes onto the stack the value of the global + name

+
+
+

+

#include + <lua.h>

+

void +
+ lua_getglobal(lua_State + *L, const char + *name);

+
+
+

+

() + pushes onto the stack the value of the global name. It is defined as a + macro:

+

#define lua_getglobal(L,s) lua_getfield(L, + LUA_GLOBALSINDEX, s)

+
+
+

-Roberto Ierusalimschy, - Luiz Henrique de Figueiredo, and - Waldemar Celes, Lua 5.1 Reference - Manual. -

-The lua_getglobal() manual page was written - by Sergey Bronnikov.

+

Roberto Ierusalimschy, + Luiz Henrique de Figueiredo, and + Waldemar Celes, Lua 5.1 Reference + Manual.

+ +
+

+

The lua_getglobal() manual page was + written by Sergey Bronnikov.

+
+ blob - d60549a47e88e352fec7358501377cea6dc773ff blob + a57b4813fa94e736a69f8587c9d798ed7b074bab --- lua_gethook.3.html +++ lua_gethook.3.html @@ -2,6 +2,7 @@ + LUA_GETHOOK(3) @@ -14,32 +15,44 @@
July 19, 2022
-

-lua_gethook — -
returns the current hook function
-

-#include - <lua.h> -
-lua_Hook -
-lua_gethook(lua_State - *L); -

-lua_gethook() returns the current hook - function. -

+

lua_gethook — + returns the current hook function

+
+
+

+

#include + <lua.h>

+

lua_Hook +
+ lua_gethook(lua_State + *L);

+
+
+

+

() + returns the current hook function.

+
+
+

-Returns the current hook function. -

-Roberto Ierusalimschy, - Luiz Henrique de Figueiredo, and - Waldemar Celes, Lua 5.1 Reference - Manual. -

-The lua_gethook() manual page was written by - Sergey Bronnikov.

+

Roberto Ierusalimschy, + Luiz Henrique de Figueiredo, and + Waldemar Celes, Lua 5.1 Reference + Manual.

+ +
+

+

The lua_gethook() manual page was written + by Sergey Bronnikov.

+
+ blob - d9429750b76735aa7e0b7c604b5c9c6916284b2a blob + 4cc898065a8265f9d107b2210e10b1e32182e683 --- lua_gethookcount.3 +++ lua_gethookcount.3 @@ -9,7 +9,7 @@ .Ft int .Fn lua_gethookcount "lua_State *L" .Sh DESCRIPTION -.Fn lua_gethookmask +.Fn lua_gethookcount returns the current hook count. .Sh RETURN VALUES Returns the current hook count. blob - 5545522c77e7d96a67167cd7605f75e462a7fbc2 blob + 7b99476827899c1b53b52b19d7560ce90868e3a3 --- lua_gethookcount.3.html +++ lua_gethookcount.3.html @@ -2,6 +2,7 @@ + LUA_GETHOOKCOUNT(3) @@ -14,32 +15,44 @@
July 13, 2022
-

-lua_gethookcount — -
returns the current hook count
-

-#include - <lua.h> -
-int -
-lua_gethookcount(lua_State - *L); -

-lua_gethookmask() returns the current hook - count. -

+

lua_gethookcount — + returns the current hook count

+
+
+

+

#include + <lua.h>

+

int +
+ lua_gethookcount(lua_State + *L);

+
+
+

+

() + returns the current hook count.

+
+
+

-Returns the current hook count. -

-Roberto Ierusalimschy, - Luiz Henrique de Figueiredo, and - Waldemar Celes, Lua 5.1 Reference - Manual. -

-The lua_gethookcount() manual page was - written by Sergey Bronnikov.

+

Roberto Ierusalimschy, + Luiz Henrique de Figueiredo, and + Waldemar Celes, Lua 5.1 Reference + Manual.

+ +
+

+

The lua_gethookcount() manual page was + written by Sergey Bronnikov.

+
+ blob - 79efa13251b5297c85310561e4ec83d1aa7daf23 blob + 44aaa9f061acff78a4a616b08005946966258148 --- lua_gethookmask.3.html +++ lua_gethookmask.3.html @@ -2,6 +2,7 @@ + LUA_GETHOOKMASK(3) @@ -14,32 +15,44 @@
July 13, 2022
-

-lua_gethookmask — -
returns the current hook mask
-

-#include - <lua.h> -
-int -
-lua_gethookmask(lua_State - *L); -

-lua_gethookmask() returns the current hook - mask. -

+

lua_gethookmask — + returns the current hook mask

+
+
+

+

#include + <lua.h>

+

int +
+ lua_gethookmask(lua_State + *L);

+
+
+

+

() + returns the current hook mask.

+
+
+

-Returns the current hook mask. -

-Roberto Ierusalimschy, - Luiz Henrique de Figueiredo, and - Waldemar Celes, Lua 5.1 Reference - Manual. -

-The lua_gethookmask() manual page was written - by Sergey Bronnikov.

+

Roberto Ierusalimschy, + Luiz Henrique de Figueiredo, and + Waldemar Celes, Lua 5.1 Reference + Manual.

+ +
+

+

The lua_gethookmask() manual page was + written by Sergey Bronnikov.

+
+ blob - 5878650304f5294eff16e9f68ffc4a45c882e3df blob + 290c9da24431f80ab77969881c9240ec620c445f --- lua_getinfo.3.html +++ lua_getinfo.3.html @@ -2,6 +2,7 @@ + LUA_GETINFO(3) @@ -14,78 +15,82 @@
July 13, 2022
-

-lua_getinfo — -
returns information about a specific function or - function invocation
-

-#include - <lua.h> -
-int -
-lua_getinfo(lua_State - *L, const char - *what, lua_Debug - *ar); -

-lua_getinfo() returns information about a - specific function or function invocation. -
-To get information about a function invocation, the parameter ar must be a valid - activation record that was filled by a previous call to lua_getstack or given - as argument to a hook (see lua_Hook(3)). -
-To get information about a function you push it onto the stack and start the - what string with the character '>'. (In that case, - lua_getinfo pops the function in the top of - the stack.) For instance, to know in which line a function - f was defined, you can write the following - code: -
-
-
-lua_Debug ar; 
-lua_getfield(L, LUA_GLOBALSINDEX, "f");  /* get global 'f' */ 
-lua_getinfo(L, ">S", &ar); 
-printf("%d0, ar.linedefined);
-
+
+

+

lua_getinfo — + returns information about a specific function or function + invocation

+
+
+

+

#include + <lua.h>

+

int +
+ lua_getinfo(lua_State + *L, const char + *what, lua_Debug + *ar);

+
+
+

+

() + returns information about a specific function or function invocation.

+

To get information about a function invocation, the parameter ar + must be a valid activation record that was filled by a previous call to + lua_getstack or given as argument to a hook (see + lua_Hook(3)).

+

To get information about a function you push it onto the stack and + start the what string with the character '>'. (In that case, + lua_getinfo pops the function in the top of the + stack.) For instance, to know in which line a function + f was defined, you can write the following code:

+

+
+
lua_Debug ar;
+lua_getfield(L, LUA_GLOBALSINDEX, "f");  /* get global 'f' */
+lua_getinfo(L, ">S", &ar);
+printf("%d0, ar.linedefined);
-
-Each character in the string what selects some fields of the structure ar to be - filled or a value to be pushed on the stack: -
+

Each character in the string what selects some fields of the + structure ar to be filled or a value to be pushed on the stack:

+

-
'n'
+
fills in the field name and namewhat;
-
'S'
+
fills in the fields source, short_src, linedefined, lastlinedefined, and what;
-
'l'
+
fills in the field currentline;
-
'u'
+
fills in the field nups;
-
'f'
+
pushes onto the stack the function that is running at the given level;
-
'L'
+
pushes onto the stack a table whose indices are the numbers of the lines that are valid on the function. (A valid line is a line with some associated code, that is, a line where you can put a break point. Non-valid lines include empty lines and comments.) This function returns 0 on error (for instance, an invalid option in what).
-

-lua_Hook(3) -
-Roberto Ierusalimschy, - Luiz Henrique de Figueiredo, and - Waldemar Celes, Lua 5.1 Reference - Manual. -

-The lua_getinfo() manual page was written by - Sergey Bronnikov.
+

lua_Hook(3)

+

Roberto Ierusalimschy, + Luiz Henrique de Figueiredo, and + Waldemar Celes, Lua 5.1 Reference + Manual.

+ +
+

+

The lua_getinfo() manual page was written + by Sergey Bronnikov.

+
+
blob - 8b4cddb9a7536e86dc8c0733e5d2e5ac5dd3da7b blob + e9aa3a2b94a9b51ee6db6a1e2356f97443bfc9be --- lua_getlocal.3.html +++ lua_getlocal.3.html @@ -2,6 +2,7 @@ + LUA_GETLOCAL(3) @@ -14,49 +15,59 @@
July 19, 2022
-

-lua_getlocal — -
gets information about a local variable of a given - activation record
-

-#include - <lua.h> -
-const char * -
-lua_getlocal(lua_State - *L, lua_Debug - *ar, int - n); -

-lua_getlocal() gets information about a local - variable of a given activation record. The parameter - ar must be a valid activation record that was - filled by a previous call to lua_getstack() - or given as argument to a hook (see lua_Hook(3) - ). The index n selects which local variable - to inspect (1 is the first parameter or active local variable, and so on, - until the last active local variable). - lua_getlocal() pushes the variable's value - onto the stack and returns its name. -
-Variable names starting with '(' (open parentheses) represent internal variables - (loop control variables, temporaries, and C function locals). -

+

lua_getlocal — + gets information about a local variable of a given + activation record

+
+
+

+

#include + <lua.h>

+

const char * +
+ lua_getlocal(lua_State + *L, lua_Debug *ar, + int n);

+
+
+

+

() + gets information about a local variable of a given activation record. The + parameter ar must be a valid activation record that + was filled by a previous call to + () + or given as argument to a hook (see lua_Hook(3) ). The + index n selects which local variable to inspect (1 is + the first parameter or active local variable, and so on, until the last + active local variable). lua_getlocal() pushes the + variable's value onto the stack and returns its name.

+

Variable names starting with '(' (open parentheses) represent + internal variables (loop control variables, temporaries, and C function + locals).

+
+
+

-Returns NULL (and pushes nothing) when the - index is greater than the number of active local variables. -

-lua_Hook(3) -
-Roberto Ierusalimschy, - Luiz Henrique de Figueiredo, and - Waldemar Celes, Lua 5.1 Reference - Manual. -

-The lua_getlocal() manual page was written by - Sergey Bronnikov.

+

lua_Hook(3)

+

Roberto Ierusalimschy, + Luiz Henrique de Figueiredo, and + Waldemar Celes, Lua 5.1 Reference + Manual.

+ +
+

+

The lua_getlocal() manual page was written + by Sergey Bronnikov.

+
+ blob - 29f00e333eac26ec6e3d4a1a5bbb83f7b38c2c64 blob + b74bb6cf94e3bb5e2653d13579d4bf386bd1f623 --- lua_getmetatable.3.html +++ lua_getmetatable.3.html @@ -2,6 +2,7 @@ + LUA_GETMETATABLE(3) @@ -14,35 +15,48 @@
July 13, 2022
-

-lua_getmetatable — -
pushes onto the stack the metatable of the value at - the given acceptable index
-

-#include - <lua.h> -
-int -
-lua_getmetatable(lua_State - *L, int - index); -

-lua_getmetatable() pushes onto the stack the - metatable of the value at the given acceptable index. -

+

lua_getmetatable — + pushes onto the stack the metatable of the value at the + given acceptable index

+
+
+

+

#include + <lua.h>

+

int +
+ lua_getmetatable(lua_State + *L, int index);

+
+
+

+

() + pushes onto the stack the metatable of the value at the given acceptable + index.

+
+
+

-If the index is not valid, or if the value does - not have a metatable, the function returns 0 and pushes nothing on the stack. -

-Roberto Ierusalimschy, - Luiz Henrique de Figueiredo, and - Waldemar Celes, Lua 5.1 Reference - Manual. -

-The lua_getmetatable() manual page was - written by Sergey Bronnikov.

+

Roberto Ierusalimschy, + Luiz Henrique de Figueiredo, and + Waldemar Celes, Lua 5.1 Reference + Manual.

+ +
+

+

The lua_getmetatable() manual page was + written by Sergey Bronnikov.

+
+ blob - a8a48f3ffbd35ba84884bbbf152346ba88e08e40 blob + 62cb1a939b22f4cc652a85f7d739504bd0e38e2f --- lua_getstack.3.html +++ lua_getstack.3.html @@ -2,6 +2,7 @@ + LUA_GETSTACK(3) @@ -14,45 +15,52 @@
July 14, 2022
-

-lua_getstack — -
get information about the interpreter runtime - stack
-

-#include - <lua.h> -
-int -
-lua_getstack(lua_State - *L, int - level, lua_Debug - *ar); -

-lua_getstack() get information about the - interpreter runtime stack. -
-This function fills parts of a lua_Debug(3) - structure with an identification of the activation record of the function - executing at a given level. Level 0 is the current running function, whereas - level n+1 is the function that has called level - n. -

+

lua_getstackget + information about the interpreter runtime stack

+
+
+

+

#include + <lua.h>

+

int +
+ lua_getstack(lua_State + *L, int level, + lua_Debug *ar);

+
+
+

+

() + get information about the interpreter runtime stack.

+

This function fills parts of a lua_Debug(3) + structure with an identification of the activation record of the function + executing at a given level. Level 0 is the current running function, whereas + level n+1 is the function that has called level n.

+
+
+

-When there are no errors, lua_getstack() - returns 1; when called with a level greater than the stack depth, it returns - 0. -

-lua_Debug(3) -
-Roberto Ierusalimschy, - Luiz Henrique de Figueiredo, and - Waldemar Celes, Lua 5.1 Reference - Manual. -

-The lua_getstack() manual page was written by - Sergey Bronnikov.

+

lua_Debug(3)

+

Roberto Ierusalimschy, + Luiz Henrique de Figueiredo, and + Waldemar Celes, Lua 5.1 Reference + Manual.

+ +
+

+

The lua_getstack() manual page was written + by Sergey Bronnikov.

+
+ blob - e0f185b666fc04a043cfbd5ae8becc5dec8f6e96 blob + 251f3432c64d806c13115da8e4c40e889754d70d --- lua_gettable.3.html +++ lua_gettable.3.html @@ -2,6 +2,7 @@ + LUA_GETTABLE(3) @@ -14,37 +15,45 @@
July 13, 2022
-

-lua_gettable — -
pushes onto the stack the value t[k], where t is the - value at the given valid index and k is the value at the top of the - stack
-

-#include - <lua.h> -
-void -
-lua_gettable(lua_State - *L, int - index); -

-lua_gettable() pushes onto the stack the - value t[k], where t is the value at the given valid index and k is the value - at the top of the stack. -
-This function pops the key from the stack (putting the resulting value in its - place). As in Lua, this function may trigger a metamethod for the - “index” event. -

+

lua_gettable — + pushes onto the stack the value t[k], where t is the value + at the given valid index and k is the value at the top of the + stack

+
+
+

+

#include + <lua.h>

+

void +
+ lua_gettable(lua_State + *L, int index);

+
+
+

+

() + pushes onto the stack the value t[k], where t is the value at the given + valid index and k is the value at the top of the stack.

+

This function pops the key from the stack (putting the resulting + value in its place). As in Lua, this function may trigger a metamethod for + the "index" event.

+
+
+

-Roberto Ierusalimschy, - Luiz Henrique de Figueiredo, and - Waldemar Celes, Lua 5.1 Reference - Manual. -

-The lua_gettable() manual page was written by - Sergey Bronnikov.

+

Roberto Ierusalimschy, + Luiz Henrique de Figueiredo, and + Waldemar Celes, Lua 5.1 Reference + Manual.

+ +
+

+

The lua_gettable() manual page was written + by Sergey Bronnikov.

+
+ blob - 512c99558f7140d0e2c5f4e2db919f5f5e5cf8fc blob + c1959333d17172e2fadc2bb1509316ec90d27726 --- lua_gettop.3.html +++ lua_gettop.3.html @@ -2,6 +2,7 @@ + LUA_GETTOP(3) @@ -14,34 +15,47 @@
July 14, 2022
-

-lua_gettop — -
returns the index of the top element in the - stack
-

-#include - <lua.h> -
-int -
-lua_gettop(lua_State - *L); -

-lua_gettop() returns the index of the top - element in the stack. Because indices start at 1, this result is equal to the - number of elements in the stack (and so 0 means an empty stack). -

+

lua_gettop — + returns the index of the top element in the + stack

+
+
+

+

#include + <lua.h>

+

int +
+ lua_gettop(lua_State + *L);

+
+
+

+

() + returns the index of the top element in the stack. Because indices start at + 1, this result is equal to the number of elements in the stack (and so 0 + means an empty stack).

+
+
+

-Returns the index of the top element in the stack. -

-Roberto Ierusalimschy, - Luiz Henrique de Figueiredo, and - Waldemar Celes, Lua 5.1 Reference - Manual. -

-The lua_gettop() manual page was written by - Sergey Bronnikov.

+

Roberto Ierusalimschy, + Luiz Henrique de Figueiredo, and + Waldemar Celes, Lua 5.1 Reference + Manual.

+ +
+

+

The lua_gettop() manual page was written + by Sergey Bronnikov.

+
+ blob - 3c418bd5fad88808a722ddc52f2f8398934aee92 blob + 26c719a3247362817ecef8eb6c832cd1be7c1c5f --- lua_getupvalue.3.html +++ lua_getupvalue.3.html @@ -2,6 +2,7 @@ + LUA_GETUPVALUE(3) @@ -14,43 +15,55 @@
July 14, 2022
-

-lua_getupvalue — -
gets information about a closure's upvalue
-

-#include - <lua.h> -
-const char * -
-lua_getupvalue(lua_State - *L, int - funcindex, int - n); -

-lua_getupvalue() gets information about a - closure's upvalue. (For Lua functions, upvalues are the external local - variables that the function uses, and that are consequently included in its - closure.) lua_getupvalue() gets the index - n of an upvalue, pushes the upvalue's value - onto the stack, and returns its name. - funcindex points to the closure in the stack. - (Upvalues have no particular order, as they are active through the whole - function. So, they are numbered in an arbitrary order.) -

+

lua_getupvalue — + gets information about a closure's upvalue

+
+
+

+

#include + <lua.h>

+

const char * +
+ lua_getupvalue(lua_State + *L, int funcindex, + int n);

+
+
+

+

() + gets information about a closure's upvalue. (For Lua functions, upvalues are + the external local variables that the function uses, and that are + consequently included in its closure.) + lua_getupvalue() gets the index + n of an upvalue, pushes the upvalue's value onto the + stack, and returns its name. funcindex points to the + closure in the stack. (Upvalues have no particular order, as they are active + through the whole function. So, they are numbered in an arbitrary + order.)

+
+
+

-Returns NULL (and pushes nothing) when the - index is greater than the number of upvalues. For C functions, this function - uses the empty string "" as a name for all upvalues. -

-Roberto Ierusalimschy, - Luiz Henrique de Figueiredo, and - Waldemar Celes, Lua 5.1 Reference - Manual. -

-The lua_getupvalue() manual page was written - by Sergey Bronnikov.

+

Roberto Ierusalimschy, + Luiz Henrique de Figueiredo, and + Waldemar Celes, Lua 5.1 Reference + Manual.

+ +
+

+

The lua_getupvalue() manual page was + written by Sergey Bronnikov.

+
+ blob - 45a2166ec6e94296eda888efdf3c61bba287a0bf blob + dcb335bc08242e402b00b68fe2f9dfeb36fa329c --- lua_insert.3.html +++ lua_insert.3.html @@ -2,6 +2,7 @@ + LUA_INSERT(3) @@ -14,33 +15,42 @@
July 13, 2022
-

-lua_insert — -
moves the top element into the given valid index, - shifting up the elements above this index to open space
-

-#include - <lua.h> -
-void -
-lua_insert(lua_State - *L, int - index); -

-lua_insert() moves the top element into the - given valid index, shifting up the elements above this index to open space. - Cannot be called with a pseudo-index, because a pseudo-index is not an actual - stack position. -

+

lua_insertmoves + the top element into the given valid index, shifting up the elements above + this index to open space

+
+
+

+

#include + <lua.h>

+

void +
+ lua_insert(lua_State + *L, int index);

+
+
+

+

() + moves the top element into the given valid index, shifting up the elements + above this index to open space. Cannot be called with a pseudo-index, + because a pseudo-index is not an actual stack position.

+
+
+

-Roberto Ierusalimschy, - Luiz Henrique de Figueiredo, and - Waldemar Celes, Lua 5.1 Reference - Manual. -

-The lua_insert() manual page was written by - Sergey Bronnikov.

+

Roberto Ierusalimschy, + Luiz Henrique de Figueiredo, and + Waldemar Celes, Lua 5.1 Reference + Manual.

+ +
+

+

The lua_insert() manual page was written + by Sergey Bronnikov.

+
+ blob - e0cbd81a443f34d0a93b1b68531c91a8c04d8995 blob + 3d7b9fbe813205dcb2124d59ba2ad09a149038ff --- lua_isboolean.3.html +++ lua_isboolean.3.html @@ -2,6 +2,7 @@ + LUA_ISBOOLEAN(3) @@ -14,34 +15,46 @@
July 14, 2022
-

-lua_isboolean — -
check whether a value is a boolean
-

-#include - <lua.h> -
-int -
-lua_isboolean(lua_State - *L, int - index); -

-lua_isboolean() returns 1 if the value at the - given acceptable index has type boolean, and 0 otherwise. -

+

lua_isboolean — + check whether a value is a boolean

+
+
+

+

#include + <lua.h>

+

int +
+ lua_isboolean(lua_State + *L, int index);

+
+
+

+

() + returns 1 if the value at the given acceptable index has type boolean, and 0 + otherwise.

+
+
+

-Returns 1 if the value at the given acceptable index has type boolean, and 0 - otherwise. -

-Roberto Ierusalimschy, - Luiz Henrique de Figueiredo, and - Waldemar Celes, Lua 5.1 Reference - Manual. -

-The lua_isboolean() manual page was written - by Sergey Bronnikov.

+

Roberto Ierusalimschy, + Luiz Henrique de Figueiredo, and + Waldemar Celes, Lua 5.1 Reference + Manual.

+ +
+

+

The lua_isboolean() manual page was + written by Sergey Bronnikov.

+
+ blob - 4d69edd2a64464a5c8db038d912c4d440c8bbaed blob + 0b5e18ee4c70e6c42b6d56fce99fb5ca31b478a1 --- lua_iscfunction.3.html +++ lua_iscfunction.3.html @@ -2,6 +2,7 @@ + LUA_ISCFUNCTION(3) @@ -14,34 +15,46 @@
July 14, 2022
-

-lua_iscfunction — -
check whether a value is a C function
-

-#include - <lua.h> -
-int -
-lua_iscfunction(lua_State - *L, int - index); -

-lua_iscfunction() returns 1 if the value at - the given acceptable index is a C function, and 0 otherwise. -

+

lua_iscfunction — + check whether a value is a C function

+
+
+

+

#include + <lua.h>

+

int +
+ lua_iscfunction(lua_State + *L, int index);

+
+
+

+

() + returns 1 if the value at the given acceptable index is a C function, and 0 + otherwise.

+
+
+

-Returns 1 if the value at the given acceptable index is a C function, and 0 - otherwise. -

-Roberto Ierusalimschy, - Luiz Henrique de Figueiredo, and - Waldemar Celes, Lua 5.1 Reference - Manual. -

-The lua_iscfunction() manual page was written - by Sergey Bronnikov.

+

Roberto Ierusalimschy, + Luiz Henrique de Figueiredo, and + Waldemar Celes, Lua 5.1 Reference + Manual.

+ +
+

+

The lua_iscfunction() manual page was + written by Sergey Bronnikov.

+
+ blob - d51c4611da2003784754cbe0671c32f9a3a900d8 blob + 7c269aaf8d8bde603b2f3d86af8991a0ba44d8e1 --- lua_isfunction.3.html +++ lua_isfunction.3.html @@ -2,6 +2,7 @@ + LUA_ISFUNCTION(3) @@ -14,34 +15,46 @@
July 14, 2022
-

-lua_isfunction — -
check whether a value is a function
-

-#include - <lua.h> -
-int -
-lua_isfunction(lua_State - *L, int - index); -

-lua_isfunction() returns 1 if the value at - the given acceptable index is a function (either C or Lua), and 0 otherwise. -

+

lua_isfunction — + check whether a value is a function

+
+
+

+

#include + <lua.h>

+

int +
+ lua_isfunction(lua_State + *L, int index);

+
+
+

+

() + returns 1 if the value at the given acceptable index is a function (either C + or Lua), and 0 otherwise.

+
+
+

-Returns 1 if the value at the given acceptable index is a function (either C or - Lua), and 0 otherwise. -

-Roberto Ierusalimschy, - Luiz Henrique de Figueiredo, and - Waldemar Celes, Lua 5.1 Reference - Manual. -

-The lua_isfunction() manual page was written - by Sergey Bronnikov.

+

Roberto Ierusalimschy, + Luiz Henrique de Figueiredo, and + Waldemar Celes, Lua 5.1 Reference + Manual.

+ +
+

+

The lua_isfunction() manual page was + written by Sergey Bronnikov.

+
+ blob - 0040013c558c08093c7041a86161948069d1dce5 blob + 538d5b4cf9dcc64851e9309724751eb15703ad17 --- lua_islightuserdata.3.html +++ lua_islightuserdata.3.html @@ -2,6 +2,7 @@ + LUA_ISLIGHTUSERDATA(3) @@ -14,34 +15,46 @@
July 14, 2022
-

-lua_islightuserdata — -
check whether a value is a light userdata
-

-#include - <lua.h> -
-int -
-lua_islightuserdata(lua_State - *L, int - index); -

-lua_islightuserdata() returns 1 if the value - at the given acceptable index is a light userdata, and 0 otherwise. -

+

lua_islightuserdata — + check whether a value is a light userdata

+
+
+

+

#include + <lua.h>

+

int +
+ lua_islightuserdata(lua_State + *L, int index);

+
+
+

+

() + returns 1 if the value at the given acceptable index is a light userdata, + and 0 otherwise.

+
+
+

-Returns 1 if the value at the given acceptable index is a light userdata, and 0 - otherwise. -

-Roberto Ierusalimschy, - Luiz Henrique de Figueiredo, and - Waldemar Celes, Lua 5.1 Reference - Manual. -

-The lua_islightuserdata() manual page was - written by Sergey Bronnikov.

+

Roberto Ierusalimschy, + Luiz Henrique de Figueiredo, and + Waldemar Celes, Lua 5.1 Reference + Manual.

+ +
+

+

The lua_islightuserdata() manual page was + written by Sergey Bronnikov.

+
+ blob - bb9227a6f6fe11518fb0b3e921ce2fea84665d6c blob + d26db645e63039db4a3bddc403a958ffa0bdfdf4 --- lua_isnil.3.html +++ lua_isnil.3.html @@ -2,6 +2,7 @@ + LUA_ISNIL(3) @@ -14,33 +15,46 @@
July 14, 2022
-

-lua_isnil — -
check whether a value is a nil
-

-#include - <lua.h> -
-int -
-lua_isnil(lua_State - *L, int - index); -

-lua_isnil() returns 1 if the value at the - given acceptable index is nil, and 0 otherwise. -

+

lua_isnilcheck + whether a value is a nil

+
+
+

+

#include + <lua.h>

+

int +
+ lua_isnil(lua_State + *L, int index);

+
+
+

+

() + returns 1 if the value at the given acceptable index is nil, and 0 + otherwise.

+
+
+

-Returns 1 if the value at the given acceptable index is nil, and 0 otherwise. -

-Roberto Ierusalimschy, - Luiz Henrique de Figueiredo, and - Waldemar Celes, Lua 5.1 Reference - Manual. -

-The lua_isnil() manual page was written by - Sergey Bronnikov.

+

Roberto Ierusalimschy, + Luiz Henrique de Figueiredo, and + Waldemar Celes, Lua 5.1 Reference + Manual.

+ +
+

+

The lua_isnil() manual page was written by + Sergey Bronnikov.

+
+ blob - 717893064edd0912d59f3d075941271a3e947508 blob + f4dd28aec3ffcab310629187598a98203663da49 --- lua_isnone.3.html +++ lua_isnone.3.html @@ -2,6 +2,7 @@ + LUA_ISNONE(3) @@ -14,34 +15,45 @@
July 14, 2022
-

-lua_isnone — -
check whether a value is not valid
-

-#include - <lua.h> -
-int -
-lua_isnone(lua_State - *L, int - index); -

-lua_isnone() returns 1 if the given - acceptable index is not valid, and 0 otherwise. -

+

lua_isnonecheck + whether a value is not valid

+
+
+

+

#include + <lua.h>

+

int +
+ lua_isnone(lua_State + *L, int index);

+
+
+

+

() + returns 1 if the given acceptable index is not valid, and 0 otherwise.

+
+
+

-Returns 1 if the given acceptable index is not valid (that is, it refers to an - element outside the current stack), and 0 otherwise. -

-Roberto Ierusalimschy, - Luiz Henrique de Figueiredo, and - Waldemar Celes, Lua 5.1 Reference - Manual. -

-The lua_isnone() manual page was written by - Sergey Bronnikov.

+

Roberto Ierusalimschy, + Luiz Henrique de Figueiredo, and + Waldemar Celes, Lua 5.1 Reference + Manual.

+ +
+

+

The lua_isnone() manual page was written + by Sergey Bronnikov.

+
+ blob - 07f6c4b36e6aac6e42f3dd9148b0c134305a4636 blob + 0d3cd88ceae8e683357916dd266280123e1c203b --- lua_isnoneornil.3.html +++ lua_isnoneornil.3.html @@ -2,6 +2,7 @@ + LUA_ISNONEORNIL(3) @@ -14,37 +15,48 @@
July 14, 2022
-

-lua_isnoneornil — -
check whether a value is not valid or if the value is - nil
-

-#include - <lua.h> -
-int -
-lua_isnoneornil(lua_State - *L, int - index); -

-lua_isnoneornil() returns 1 if the given - acceptable index is not valid or if the value at this index is nil, and 0 - otherwise. -

+

lua_isnoneornil — + check whether a value is not valid or if the value is + nil

+
+
+

+

#include + <lua.h>

+

int +
+ lua_isnoneornil(lua_State + *L, int index);

+
+
+

+

() + returns 1 if the given acceptable index is not valid or if the value at this + index is nil, and 0 otherwise.

+
+
+

-Returns 1 if the given acceptable index is not valid (that is, it refers to an - element outside the current stack) or if the value at this index is nil, and 0 - otherwise. -

-Roberto Ierusalimschy, - Luiz Henrique de Figueiredo, and - Waldemar Celes, Lua 5.1 Reference - Manual. -

-The lua_isnoneornil() manual page was written - by Sergey Bronnikov.

+

Roberto Ierusalimschy, + Luiz Henrique de Figueiredo, and + Waldemar Celes, Lua 5.1 Reference + Manual.

+ +
+

+

The lua_isnoneornil() manual page was + written by Sergey Bronnikov.

+
+ blob - 3f4549d0691396798300229c404d2722e67f85d3 blob + 48c0b16dbade302d273dcd3f8636ee172027d5b3 --- lua_isnumber.3.html +++ lua_isnumber.3.html @@ -2,6 +2,7 @@ + LUA_ISNUMBER(3) @@ -14,35 +15,46 @@
July 14, 2022
-

-lua_isnumber — -
check whether a value is a number
-

-#include - <lua.h> -
-int -
-lua_isnumber(lua_State - *L, int - index); -

-lua_isnumber() returns 1 if the value at the - given acceptable index is a number or a string convertible to a number, and 0 - otherwise. -

+

lua_isnumber — + check whether a value is a number

+
+
+

+

#include + <lua.h>

+

int +
+ lua_isnumber(lua_State + *L, int index);

+
+
+

+

() + returns 1 if the value at the given acceptable index is a number or a string + convertible to a number, and 0 otherwise.

+
+
+

-Returns 1 if the value at the given acceptable index is a number or a string - convertible to a number, and 0 otherwise. -

-Roberto Ierusalimschy, - Luiz Henrique de Figueiredo, and - Waldemar Celes, Lua 5.1 Reference - Manual. -

-The lua_isnumber() manual page was written by - Sergey Bronnikov.

+

Roberto Ierusalimschy, + Luiz Henrique de Figueiredo, and + Waldemar Celes, Lua 5.1 Reference + Manual.

+ +
+

+

The lua_isnumber() manual page was written + by Sergey Bronnikov.

+
+ blob - ffa6a8811792cdc342ecec6d9ee76622a58e6119 blob + a41bb7e4836540c1b7fd68f99fa5d020c71a3773 --- lua_isstring.3.html +++ lua_isstring.3.html @@ -2,6 +2,7 @@ + LUA_ISSTRING(3) @@ -14,35 +15,46 @@
July 14, 2022
-

-lua_isstring — -
check whether a value is a string or a number
-

-#include - <lua.h> -
-int -
-lua_isstring(lua_State - *L, int - index); -

-lua_isstring() returns 1 if the value at the - given acceptable index is a string or a number (which is always convertible to - a string), and 0 otherwise. -

+

lua_isstring — + check whether a value is a string or a number

+
+
+

+

#include + <lua.h>

+

int +
+ lua_isstring(lua_State + *L, int index);

+
+
+

+

() + returns 1 if the value at the given acceptable index is a string or a number + (which is always convertible to a string), and 0 otherwise.

+
+
+

-Returns 1 if the value at the given acceptable index is a string or a number - (which is always convertible to a string), and 0 otherwise. -

-Roberto Ierusalimschy, - Luiz Henrique de Figueiredo, and - Waldemar Celes, Lua 5.1 Reference - Manual. -

-The lua_isstring() manual page was written by - Sergey Bronnikov.

+

Roberto Ierusalimschy, + Luiz Henrique de Figueiredo, and + Waldemar Celes, Lua 5.1 Reference + Manual.

+ +
+

+

The lua_isstring() manual page was written + by Sergey Bronnikov.

+
+ blob - e39117a711dd4025854d373dba1d61eb321e0d41 blob + 9eb0069fcd5ed270761de16be14b3582b68ea230 --- lua_istable.3.html +++ lua_istable.3.html @@ -2,6 +2,7 @@ + LUA_ISTABLE(3) @@ -14,33 +15,44 @@
July 15, 2022
-

-lua_istable — -
check whether a value is a table
-

-#include - <lua.h> -
-int -
-lua_istable(lua_State - *L, int - index); -

-lua_istable() -

+

lua_istable — + check whether a value is a table

+
+
+

+

#include + <lua.h>

+

int +
+ lua_istable(lua_State + *L, int index);

+
+
+

+

()

+
+
+

-Returns 1 if the value at the given acceptable index is a table, and 0 - otherwise. -

-Roberto Ierusalimschy, - Luiz Henrique de Figueiredo, and - Waldemar Celes, Lua 5.1 Reference - Manual. -

-The lua_istable() manual page was written by - Sergey Bronnikov.

+

Roberto Ierusalimschy, + Luiz Henrique de Figueiredo, and + Waldemar Celes, Lua 5.1 Reference + Manual.

+ +
+

+

The lua_istable() manual page was written + by Sergey Bronnikov.

+
+ blob - ddfab492915454a0d87db1a5891cbc1d12c54e70 blob + 1c59a236a36d5b4eeb0c3b920ce4a90d5c5cb5a0 --- lua_isthread.3.html +++ lua_isthread.3.html @@ -2,6 +2,7 @@ + LUA_ISTHREAD(3) @@ -14,34 +15,46 @@
July 15, 2022
-

-lua_isthread — -
check whether a value is a thread
-

-#include - <lua.h> -
-int -
-lua_isthread(lua_State - *L, int - index); -

-lua_isthread() returns 1 if the value at the - given acceptable index is a thread, and 0 otherwise. -

+

lua_isthread — + check whether a value is a thread

+
+
+

+

#include + <lua.h>

+

int +
+ lua_isthread(lua_State + *L, int index);

+
+
+

+

() + returns 1 if the value at the given acceptable index is a thread, and 0 + otherwise.

+
+
+

-Returns 1 if the value at the given acceptable index is a thread, and 0 - otherwise. -

-Roberto Ierusalimschy, - Luiz Henrique de Figueiredo, and - Waldemar Celes, Lua 5.1 Reference - Manual. -

-The lua_isthread() manual page was written by - Sergey Bronnikov.

+

Roberto Ierusalimschy, + Luiz Henrique de Figueiredo, and + Waldemar Celes, Lua 5.1 Reference + Manual.

+ +
+

+

The lua_isthread() manual page was written + by Sergey Bronnikov.

+
+ blob - 01e2c8e7455f05f9acbba7f0daaaffbebae17bcb blob + 7ccbda664025f834cc741d358f4351d429117ef1 --- lua_isuserdata.3.html +++ lua_isuserdata.3.html @@ -2,6 +2,7 @@ + LUA_ISUSERDATA(3) @@ -14,35 +15,46 @@
July 15, 2022
-

-lua_isuserdata — -
check whether a value is a userdata
-

-#include - <lua.h> -
-int -
-lua_isuserdata(lua_State - *L, int - index); -

-lua_isuserdata() returns 1 if the value at - the given acceptable index is a userdata (either full or light), and 0 - otherwise. -

+

lua_isuserdata — + check whether a value is a userdata

+
+
+

+

#include + <lua.h>

+

int +
+ lua_isuserdata(lua_State + *L, int index);

+
+
+

+

() + returns 1 if the value at the given acceptable index is a userdata (either + full or light), and 0 otherwise.

+
+
+

-Returns 1 if the value at the given acceptable index is a userdata (either full - or light), and 0 otherwise. -

-Roberto Ierusalimschy, - Luiz Henrique de Figueiredo, and - Waldemar Celes, Lua 5.1 Reference - Manual. -

-The lua_isuserdata() manual page was written - by Sergey Bronnikov.

+

Roberto Ierusalimschy, + Luiz Henrique de Figueiredo, and + Waldemar Celes, Lua 5.1 Reference + Manual.

+ +
+

+

The lua_isuserdata() manual page was + written by Sergey Bronnikov.

+
+ blob - bb2e312d20407d408c350cdbfdc7a2c59dcc145c blob + f4e2e338c190d1f426be66d4e5bd17d652d8b534 --- lua_lessthan.3.html +++ lua_lessthan.3.html @@ -2,6 +2,7 @@ + LUA_LESSTHAN(3) @@ -14,37 +15,48 @@
July 15, 2022
-

-lua_lessthan — -
compares two values
-

-#include - <lua.h> -
-int -
-lua_lessthan(lua_State - *L, int - index1, int - index2); -

-lua_lessthan() -

+

lua_lessthan — + compares two values

+
+
+

+

#include + <lua.h>

+

int +
+ lua_lessthan(lua_State + *L, int index1, + int index2);

+
+
+

+

()

+
+
+

-Returns 1 if the value at acceptable index - index1 is smaller than the value at - acceptable index index2 , following the - semantics of the Lua < operator (that is, may call metamethods). Otherwise - returns 0. Also returns 0 if any of the indices is non valid. -

-Roberto Ierusalimschy, - Luiz Henrique de Figueiredo, and - Waldemar Celes, Lua 5.1 Reference - Manual. -

-The lua_lessthan() manual page was written by - Sergey Bronnikov.

+

Roberto Ierusalimschy, + Luiz Henrique de Figueiredo, and + Waldemar Celes, Lua 5.1 Reference + Manual.

+ +
+

+

The lua_lessthan() manual page was written + by Sergey Bronnikov.

+
+ blob - a978645f548f0c08940315516008e4372c483c44 blob + db5eaed4acf6c1e5f467033d5eb412626f08b29e --- lua_load.3.html +++ lua_load.3.html @@ -2,6 +2,7 @@ + LUA_LOAD(3) @@ -14,64 +15,72 @@
July 15, 2022
-

-lua_load — -
loads a Lua chunk
-

-#include - <lua.h> -
-int -
-lua_load(lua_State - *L, lua_Reader - reader, void - *data, const - char *chunkname); -

-lua_load() loads a Lua chunk. If there are no - errors, lua_load() pushes the compiled - chunk as a Lua function on top of the stack. Otherwise, it pushes an error - message. -
-This function only loads a chunk; it does not run it. -
-lua_load() automatically detects whether the - chunk is text or binary, and loads it accordingly, see - luac(1). -
-The lua_load() function uses a user-supplied - reader function to read the chunk, see - lua_Reader(3). The data argument is an opaque - value passed to the reader function. -
-The chunkname argument gives a name to the chunk, which is used for error - messages and in debug information. -

+

lua_loadloads a + Lua chunk

+
+
+

+

#include + <lua.h>

+

int +
+ lua_load(lua_State + *L, lua_Reader + reader, void *data, + const char + *chunkname);

+
+
+

+

() + loads a Lua chunk. If there are no errors, + lua_load() pushes the compiled chunk as a Lua + function on top of the stack. Otherwise, it pushes an error message.

+

This function only loads a chunk; it does not run it.

+

() + automatically detects whether the chunk is text or binary, and loads it + accordingly, see luac(1).

+

The + () + function uses a user-supplied reader function to read the chunk, see + lua_Reader(3). The data argument is an opaque value passed + to the reader function.

+

The chunkname argument gives a name to the chunk, which is used + for error messages and in debug information.

+
+
+

-The return values of lua_load() are: -
+

The return values of lua_load() are:

+

-
:
+
:
no errors;
-
:
+
:
syntax error during pre-compilation;
-
:
+
:
memory allocation error.
-

-luac(1), lua_Reader(3) -
-Roberto Ierusalimschy, - Luiz Henrique de Figueiredo, and - Waldemar Celes, Lua 5.1 Reference - Manual. -

-The lua_load() manual page was written by - Sergey Bronnikov.

+

luac(1), lua_Reader(3)

+

Roberto Ierusalimschy, + Luiz Henrique de Figueiredo, and + Waldemar Celes, Lua 5.1 Reference + Manual.

+ +
+

+

The lua_load() manual page was written by + Sergey Bronnikov.

+
+ blob - f34c2c29b20d17a80a740a05c62fb838de96e703 blob + 080d4a565bc93a3013e1e72bf6763d41709b5d4b --- lua_newstate.3.html +++ lua_newstate.3.html @@ -2,6 +2,7 @@ + LUA_NEWSTATE(3) @@ -14,37 +15,48 @@
July 15, 2022
-

-lua_newstate — -
creates a new, independent state
-

-#include - <lua.h> -
-lua_State * -
-lua_newstate(lua_Alloc - f, void - *ud); -

-lua_newstate() creates a new, independent - state. The argument f is the allocator - function; Lua does all memory allocation for this state through this function. - The second argument, ud, is an opaque pointer - that Lua simply passes to the allocator in every call. -

+

lua_newstate — + creates a new, independent state

+
+
+

+

#include + <lua.h>

+

lua_State * +
+ lua_newstate(lua_Alloc + f, void *ud);

+
+
+

+

() + creates a new, independent state. The argument f is + the allocator function; Lua does all memory allocation for this state + through this function. The second argument, ud, is an + opaque pointer that Lua simply passes to the allocator in every call.

+
+
+

-Returns NULL if cannot create the state (due - to lack of memory). -

-Roberto Ierusalimschy, - Luiz Henrique de Figueiredo, and - Waldemar Celes, Lua 5.1 Reference - Manual. -

-The lua_newstate() manual page was written by - Sergey Bronnikov.

+

Roberto Ierusalimschy, + Luiz Henrique de Figueiredo, and + Waldemar Celes, Lua 5.1 Reference + Manual.

+ +
+

+

The lua_newstate() manual page was written + by Sergey Bronnikov.

+
+ blob - 7403955b7ff523efd094110880d6ea5c3193d036 blob + 42824895e167b14e7ae0322038caedfd382efd4b --- lua_newtable.3.html +++ lua_newtable.3.html @@ -2,6 +2,7 @@ + LUA_NEWTABLE(3) @@ -14,31 +15,42 @@
July 14, 2022
-

-lua_newtable — -
creates a new empty table and pushes it onto the - stack
-

-#include - <lua.h> -
-void -
-lua_newtable(lua_State - *L); -

-lua_newtable() creates a new empty table and - pushes it onto the stack. It is equivalent to - lua_createtable(L, 0, 0). -

+

lua_newtable — + creates a new empty table and pushes it onto the + stack

+
+
+

+

#include + <lua.h>

+

void +
+ lua_newtable(lua_State + *L);

+
+
+

+

() + creates a new empty table and pushes it onto the stack. It is equivalent to + .

+
+
+

-Roberto Ierusalimschy, - Luiz Henrique de Figueiredo, and - Waldemar Celes, Lua 5.1 Reference - Manual. -

-The lua_newtable() manual page was written by - Sergey Bronnikov.

+

Roberto Ierusalimschy, + Luiz Henrique de Figueiredo, and + Waldemar Celes, Lua 5.1 Reference + Manual.

+ +
+

+

The lua_newtable() manual page was written + by Sergey Bronnikov.

+
+ blob - b54d4fe6e650c3078385c62318d5083a4ce4b43d blob + fd82a65abd638cf4cf34f89ea6e701b01a2da7fe --- lua_newthread.3.html +++ lua_newthread.3.html @@ -2,6 +2,7 @@ + LUA_NEWTHREAD(3) @@ -14,41 +15,51 @@
July 14, 2022
-

-lua_newthread — -
creates a new thread
-

-#include - <lua.h> -
-lua_State * -
-lua_newthread(lua_State - *L); -

-lua_newthread() creates a new thread, pushes - it on the stack, and returns a pointer to a - lua_State(3) that represents this new thread. The - new state returned by this function shares with the original state all global - objects (such as tables), but has an independent execution stack. -
-There is no explicit function to close or to destroy a thread. Threads are - subject to garbage collection, like any Lua object. -

+

lua_newthread — + creates a new thread

+
+
+

+

#include + <lua.h>

+

lua_State * +
+ lua_newthread(lua_State + *L);

+
+
+

+

() + creates a new thread, pushes it on the stack, and returns a pointer to a + lua_State(3) that represents this new thread. The new + state returned by this function shares with the original state all global + objects (such as tables), but has an independent execution stack.

+

There is no explicit function to close or to destroy a thread. + Threads are subject to garbage collection, like any Lua object.

+
+
+

-lua_newthread() returns a pointer to a - lua_State(3) that represents this new thread. -

lua_State(3) that represents this new thread.

+

+
+

-lua_State(3) -
-Roberto Ierusalimschy, - Luiz Henrique de Figueiredo, and - Waldemar Celes, Lua 5.1 Reference - Manual. -

-The lua_newthread() manual page was written - by Sergey Bronnikov.

+

lua_State(3)

+

Roberto Ierusalimschy, + Luiz Henrique de Figueiredo, and + Waldemar Celes, Lua 5.1 Reference + Manual.

+ +
+

+

The lua_newthread() manual page was + written by Sergey Bronnikov.

+
+ blob - c8ecebcde1af644c9f4ab59ced1615574dfa425d blob + 4f53c1823356c4dbc14a0f9428ab20c654fde287 --- lua_newuserdata.3.html +++ lua_newuserdata.3.html @@ -2,6 +2,7 @@ + LUA_NEWUSERDATA(3) @@ -14,41 +15,51 @@
July 15, 2022
-

-lua_newuserdata — -
allocates a new block of memory with the given - size
-

-#include - <lua.h> -
-void * -
-lua_newuserdata(lua_State - *L, size_t - size); -

-lua_newuserdata() allocates a new block of - memory with the given size, pushes onto the stack a new full userdata with the - block address, and returns this address. -
-Userdata represent C values in Lua. A full userdata - represents a block of memory. It is an object (like a table): you must create - it, it can have its own metatable, and you can detect when it is being - collected. A full userdata is only equal to itself (under raw equality). -
-When Lua collects a full userdata with a gc metamethod, Lua calls the metamethod - and marks the userdata as finalized. When this userdata is collected again - then Lua frees its corresponding memory. -

+

lua_newuserdata — + allocates a new block of memory with the given + size

+
+
+

+

#include + <lua.h>

+

void * +
+ lua_newuserdata(lua_State + *L, size_t + size);

+
+
+

+

() + allocates a new block of memory with the given size, pushes onto the stack a + new full userdata with the block address, and returns this address.

+

Userdata represent C values in Lua. A + userdata + represents a block of memory. It is an object (like a table): you must + create it, it can have its own metatable, and you can detect when it is + being collected. A full userdata is only equal to itself (under raw + equality).

+

When Lua collects a full userdata with a gc metamethod, Lua calls + the metamethod and marks the userdata as finalized. When this userdata is + collected again then Lua frees its corresponding memory.

+
+
+

-Roberto Ierusalimschy, - Luiz Henrique de Figueiredo, and - Waldemar Celes, Lua 5.1 Reference - Manual. -

-The lua_newuserdata() manual page was written - by Sergey Bronnikov.

+

Roberto Ierusalimschy, + Luiz Henrique de Figueiredo, and + Waldemar Celes, Lua 5.1 Reference + Manual.

+ +
+

+

The lua_newuserdata() manual page was + written by Sergey Bronnikov.

+
+ blob - dcaa27caf94fddc44347e1b5c960495099c7f6db blob + c70323d87269ca543b787caed6822068c69d09a4 --- lua_next.3.html +++ lua_next.3.html @@ -2,6 +2,7 @@ + LUA_NEXT(3) @@ -14,60 +15,62 @@
July 15, 2022
-

-lua_next — -
pops a key from the stack, and pushes a key-value - pair from the table
-

-#include - <lua.h> -
-int -
-lua_next(lua_State - *L, int - index); -

-lua_next() pops a key from the stack, and - pushes a key-value pair from the table at the given index (the - "next" pair after the given key). If there are no more elements in - the table, then lua_next returns 0 (and - pushes nothing). -
-A typical traversal looks like this: -
-
-
-/* table is in the stack at index 't' */ 
-lua_pushnil(L);  /* first key */ 
-while (lua_next(L, t) != 0) { 
-  /* uses 'key' (at index -2) and 'value' (at index -1) */ 
-  printf("%s - %s0, 
-         lua_typename(L, lua_type(L, -2)), 
-         lua_typename(L, lua_type(L, -1))); 
-  /* removes 'value'; keeps 'key' for next iteration */ 
-  lua_pop(L, 1); 
-}
-
+
+

+

lua_nextpops a + key from the stack, and pushes a key-value pair from the table

+
+
+

+

#include + <lua.h>

+

int +
+ lua_next(lua_State + *L, int index);

+
+
+

+

() + pops a key from the stack, and pushes a key-value pair from the table at the + given index (the "next" pair after the given key). If there are no + more elements in the table, then lua_next returns 0 + (and pushes nothing).

+

A typical traversal looks like this:

+

+
+
/* table is in the stack at index 't' */
+lua_pushnil(L);  /* first key */
+while (lua_next(L, t) != 0) {
+  /* uses 'key' (at index -2) and 'value' (at index -1) */
+  printf("%s - %s0,
+         lua_typename(L, lua_type(L, -2)),
+         lua_typename(L, lua_type(L, -1)));
+  /* removes 'value'; keeps 'key' for next iteration */
+  lua_pop(L, 1);
+}
-
-While traversing a table, do not call - lua_tolstring(3) directly on a key, unless you - know that the key is actually a string. Recall that - lua_tolstring(3) changes the value at the given - index; this confuses the next call to - lua_next. -

lua_tolstring(3) directly on a key, unless you know that + the key is actually a string. Recall that lua_tolstring(3) + changes the value at the given index; this confuses the next call to + lua_next.

+

+
+

-lua_tolstring(3) -
-Roberto Ierusalimschy, - Luiz Henrique de Figueiredo, and - Waldemar Celes, Lua 5.1 Reference - Manual. -

-The lua_next() manual page was written by - Sergey Bronnikov.
+

lua_tolstring(3)

+

Roberto Ierusalimschy, + Luiz Henrique de Figueiredo, and + Waldemar Celes, Lua 5.1 Reference + Manual.

+ +
+

+

The lua_next() manual page was written by + Sergey Bronnikov.

+
+
blob - 0887d3133b0d7332f851c83e94ee3c8b6e1a7ac5 blob + 53767cbb829253eb400e407777c3f54d56aa7b24 --- lua_objlen.3.html +++ lua_objlen.3.html @@ -2,6 +2,7 @@ + LUA_OBJLEN(3) @@ -14,33 +15,42 @@
July 20, 2022
-

-lua_objlen — -
returns the length of the value
-

-#include - <lua.h> -
-size_t -
-lua_objlen(lua_State - *L, int - index); -

-lua_objlen() returns the - “length” of the value at the given acceptable index: for - strings, this is the string length; for tables, this is the result of the - length operator ('#'); for userdata, this is the size of the block of memory - allocated for the userdata; for other values, it is 0. -

+

lua_objlen — + returns the length of the value

+
+
+

+

#include + <lua.h>

+

size_t +
+ lua_objlen(lua_State + *L, int index);

+
+
+

+

() + returns the "length" of the value at the given acceptable index: + for strings, this is the string length; for tables, this is the result of + the length operator ('#'); for userdata, this is the size of the block of + memory allocated for the userdata; for other values, it is 0.

+
+
+

-Roberto Ierusalimschy, - Luiz Henrique de Figueiredo, and - Waldemar Celes, Lua 5.1 Reference - Manual. -

-The lua_objlen() manual page was written by - Sergey Bronnikov.

+

Roberto Ierusalimschy, + Luiz Henrique de Figueiredo, and + Waldemar Celes, Lua 5.1 Reference + Manual.

+ +
+

+

The lua_objlen() manual page was written + by Sergey Bronnikov.

+
+ blob - bafe33cf98adfb21bd26330ed5534dfc7fdde3cf blob + 4b005ef4b483875a16e05f2c938dda053464c068 --- lua_pcall.3.html +++ lua_pcall.3.html @@ -2,6 +2,7 @@ + LUA_PCALL(3) @@ -14,76 +15,82 @@
July 15, 2022
-

-lua_pcall — -
calls a function in protected mode
-

-#include - <lua.h> -
-int -
-lua_pcall(lua_State - *L, int - nargs, int - nresults, int - errfunc); -

-lua_pcall() calls a function in protected - mode. -
-Both nargs and - nresults have the same meaning as in - lua_call(3). If there are no errors during the - call, lua_pcall behaves exactly like - lua_call(3). However, if there is any error, - lua_pcall catches it, pushes a single value - on the stack (the error message), and returns an error code. Like - lua_call(3), - lua_pcall always removes the function and - its arguments from the stack. -
-If errfunc is 0, then the error message - returned on the stack is exactly the original error message. Otherwise, - errfunc is the stack index of an - error handler function. (In the current - implementation, this index cannot be a pseudo-index.) In case of runtime - errors, this function will be called with the error message and its return - value will be the message returned on the stack by - lua_pcall. -
-Typically, the error handler function is used to add more debug information to - the error message, such as a stack traceback. Such information cannot be - gathered after the return of lua_pcall, - since by then the stack has unwound. -

+

lua_pcallcalls + a function in protected mode

+
+
+

+

#include + <lua.h>

+

int +
+ lua_pcall(lua_State + *L, int nargs, + int nresults, + int errfunc);

+
+
+

+

() + calls a function in protected mode.

+

Both nargs and + nresults have the same meaning as in + lua_call(3). If there are no errors during the call, + lua_pcall behaves exactly like + lua_call(3). However, if there is any error, + lua_pcall catches it, pushes a single value on the + stack (the error message), and returns an error code. Like + lua_call(3), lua_pcall always + removes the function and its arguments from the stack.

+

If errfunc is 0, then the error + message returned on the stack is exactly the original error message. + Otherwise, errfunc is the stack index of an + . (In the current implementation, this index cannot be a + pseudo-index.) In case of runtime errors, this function will be called with + the error message and its return value will be the message returned on the + stack by lua_pcall.

+

Typically, the error handler function is used to add more debug + information to the error message, such as a stack traceback. Such + information cannot be gathered after the return of + lua_pcall, since by then the stack has unwound.

+
+
+

-The lua_pcall function returns 0 in case of - success or one of the following error codes (defined in - <lua.h>): -
+

The lua_pcall function returns 0 in case + of success or one of the following error codes (defined in + <lua.h>):

+

-
:
+
:
a runtime error.
-
:
+
:
memory allocation error. For such errors, Lua does not call the error handler function.
-
:
+
:
error while running the error handler function.
-

-lua_call(3) -
-Roberto Ierusalimschy, - Luiz Henrique de Figueiredo, and - Waldemar Celes, Lua 5.1 Reference - Manual. -

-The lua_pcall() manual page was written by - Sergey Bronnikov.

+

lua_call(3)

+

Roberto Ierusalimschy, + Luiz Henrique de Figueiredo, and + Waldemar Celes, Lua 5.1 Reference + Manual.

+ +
+

+

The lua_pcall() manual page was written by + Sergey Bronnikov.

+
+ blob - 0f7297c88965d2c9a9f5487051f8f9f19f331879 blob + 38f6a5e06caf725836700091966a371a5b32eec1 --- lua_pop.3.html +++ lua_pop.3.html @@ -2,6 +2,7 @@ + LUA_POP(3) @@ -14,30 +15,39 @@
July 20, 2022
-

-lua_pop — -
pops n elements from the stack
-

-#include - <lua.h> -
-void -
-lua_pop(lua_State - *L, int - n); -

-lua_pop() pops - n elements from the stack. -

+

lua_poppops n + elements from the stack

+
+
+

+

#include + <lua.h>

+

void +
+ lua_pop(lua_State + *L, int n);

+
+
+

+

() + pops n elements from the stack.

+
+
+

-Roberto Ierusalimschy, - Luiz Henrique de Figueiredo, and - Waldemar Celes, Lua 5.1 Reference - Manual. -

-The lua_pop() manual page was written by - Sergey Bronnikov.

+

Roberto Ierusalimschy, + Luiz Henrique de Figueiredo, and + Waldemar Celes, Lua 5.1 Reference + Manual.

+ +
+

+

The lua_pop() manual page was written by + Sergey Bronnikov.

+
+ blob - 35833874179d3c4ad0c96e8ab5781d3902e241b8 blob + ad66eb002cc5699d3454113b223fc0474e37b1f9 --- lua_pushboolean.3.html +++ lua_pushboolean.3.html @@ -2,6 +2,7 @@ + LUA_PUSHBOOLEAN(3) @@ -14,30 +15,40 @@
July 18, 2022
-

-lua_pushboolean — -
pushes a boolean value onto the stack
-

-#include - <lua.h> -
-void -
-lua_pushboolean(lua_State - *L, int - b); -

-lua_pushboolean() pushes a boolean value with - value b onto the stack. -

+

lua_pushboolean — + pushes a boolean value onto the stack

+
+
+

+

#include + <lua.h>

+

void +
+ lua_pushboolean(lua_State + *L, int b);

+
+
+

+

() + pushes a boolean value with value b onto the + stack.

+
+
+

-Roberto Ierusalimschy, - Luiz Henrique de Figueiredo, and - Waldemar Celes, Lua 5.1 Reference - Manual. -

-The lua_pushboolean() manual page was written - by Sergey Bronnikov.

+

Roberto Ierusalimschy, + Luiz Henrique de Figueiredo, and + Waldemar Celes, Lua 5.1 Reference + Manual.

+ +
+

+

The lua_pushboolean() manual page was + written by Sergey Bronnikov.

+
+ blob - 117e6037055ded599add48311fc819f673d13164 blob + 1b91e27fd4f687cb63ff04806f5920756f8e3f55 --- lua_pushcclosure.3.html +++ lua_pushcclosure.3.html @@ -2,6 +2,7 @@ + LUA_PUSHCCLOSURE(3) @@ -14,46 +15,52 @@
July 18, 2022
-

-lua_pushcclosure — -
pushes a new C closure onto the stack
-

-#include - <lua.h> -
-void -
-lua_pushcclosure(lua_State - *L, - lua_CFunction - fn, int - n); -

-lua_pushcclosure() pushes a new C closure - onto the stack. -
-When a C function is created, it is possible to associate some values with it, - thus creating a C closure; these values are then accessible to the function - whenever it is called. To associate values with a C function, first these - values should be pushed onto the stack (when there are multiple values, the - first value is pushed first). Then - lua_pushcclosure() is called to create and - push the C function onto the stack, with the argument - n telling how many values should be - associated with the function. - lua_pushcclosure() also pops these values - from the stack. -
-The maximum value for n is 255. -

+

lua_pushcclosure — + pushes a new C closure onto the stack

+
+
+

+

#include + <lua.h>

+

void +
+ lua_pushcclosure(lua_State + *L, lua_CFunction + fn, int n);

+
+
+

+

() + pushes a new C closure onto the stack.

+

When a C function is created, it is + possible to associate some values with it, thus creating a C closure; these + values are then accessible to the function whenever it is called. To + associate values with a C function, first these values should be pushed onto + the stack (when there are multiple values, the first value is pushed first). + Then + () + is called to create and push the C function onto the stack, with the + argument n telling how many values should be + associated with the function. lua_pushcclosure() + also pops these values from the stack.

+

The maximum value for n is 255.

+
+
+

-Roberto Ierusalimschy, - Luiz Henrique de Figueiredo, and - Waldemar Celes, Lua 5.1 Reference - Manual. -

-The lua_pushcclosure() manual page was - written by Sergey Bronnikov.

+

Roberto Ierusalimschy, + Luiz Henrique de Figueiredo, and + Waldemar Celes, Lua 5.1 Reference + Manual.

+ +
+

+

The lua_pushcclosure() manual page was + written by Sergey Bronnikov.

+
+ blob - afae11a1640c6415c64f3eef253ee47139792a58 blob + d2f3619935c580aed4a340853e1ffa8dfea4539d --- lua_pushcfunction.3.html +++ lua_pushcfunction.3.html @@ -2,6 +2,7 @@ + LUA_PUSHCFUNCTION(3) @@ -14,47 +15,52 @@
July 18, 2022
-

-lua_pushcfunction — -
pushes a C function onto the stack
-

-#include - <lua.h> -
-void -
-lua_pushcfunction(lua_State - *L, - lua_CFunction - f); -

-lua_pushcfunction() pushes a C function onto - the stack. This function receives a pointer to a C function and pushes onto - the stack a Lua value of type function that, when called, invokes the - corresponding C function. -
-Any function to be registered in Lua must follow the correct protocol to receive - its parameters and return its results (see - lua_CFunction(3)). -
-lua_pushcfunction is defined as a macro: -
-
-
-#define lua_pushcfunction(L,f)  lua_pushcclosure(L,f,0)
-
+
+

+

lua_pushcfunction — + pushes a C function onto the stack

+
+
+

+

#include + <lua.h>

+

void +
+ lua_pushcfunction(lua_State + *L, lua_CFunction + f);

+
+
+

+

() + pushes a C function onto the stack. This function receives a pointer to a C + function and pushes onto the stack a Lua value of type function that, when + called, invokes the corresponding C function.

+

Any function to be registered in Lua must follow the correct + protocol to receive its parameters and return its results (see + lua_CFunction(3)).

+

lua_pushcfunction is defined as a + macro:

+

+
+
#define lua_pushcfunction(L,f)  lua_pushcclosure(L,f,0)
-

-lua_CFunction(3) -
-Roberto Ierusalimschy, - Luiz Henrique de Figueiredo, and - Waldemar Celes, Lua 5.1 Reference - Manual. -

-The lua_pushcfunction() manual page was - written by Sergey Bronnikov.
+

lua_CFunction(3)

+

Roberto Ierusalimschy, + Luiz Henrique de Figueiredo, and + Waldemar Celes, Lua 5.1 Reference + Manual.

+ +
+

+

The lua_pushcfunction() manual page was + written by Sergey Bronnikov.

+
+
blob - bc912fa9e8dd7be08fbc72674e34fa583e59bfda blob + ea8aedd1e20323b79e2c81ad44b9f0abd7b3dd61 --- lua_pushfstring.3.html +++ lua_pushfstring.3.html @@ -2,6 +2,7 @@ + LUA_PUSHFSTRING(3) @@ -14,25 +15,28 @@
July 20, 2022
-

-lua_pushfstring — -
pushes onto the stack a formatted string and returns - a pointer to this string
-

-#include - <lua.h> -
-const char * -
-lua_pushfstring(lua_State - *L, const char - *fmt, - ...); -

-lua_pushfstring() pushes onto the stack a - formatted string and returns a pointer to this string. It is similar to the C - function sprintf(3), but has some important - differences: +
+

+

lua_pushfstring — + pushes onto the stack a formatted string and returns a + pointer to this string

+
+
+

+

#include + <lua.h>

+

const char * +
+ lua_pushfstring(lua_State + *L, const char + *fmt, ...);

+
+
+

+

() + pushes onto the stack a formatted string and returns a pointer to this + string. It is similar to the C function sprintf(3), but + has some important differences:

  • You do not have to allocate space for the result: the result is a Lua string and Lua takes care of memory allocation (and deallocation, through @@ -41,22 +45,27 @@ widths, or precisions. The conversion specifiers can only be ‘%%’ (inserts a '%' in the string), ‘%s’ (inserts a zero-terminated string, with no size restrictions), - ‘%f’ (inserts a lua_Number(3)), + ‘%f’ (inserts a lua_Number(3)), ‘%p’ (inserts a pointer as a hexadecimal numeral), ‘%d’ (inserts an int), and ‘%c’ (inserts an int as a character).
-

-lua_Number(3) -
-Roberto Ierusalimschy, - Luiz Henrique de Figueiredo, and - Waldemar Celes, Lua 5.1 Reference - Manual. -

-The lua_pushfstring() manual page was written - by Sergey Bronnikov.
+

lua_Number(3)

+

Roberto Ierusalimschy, + Luiz Henrique de Figueiredo, and + Waldemar Celes, Lua 5.1 Reference + Manual.

+ +
+

+

The lua_pushfstring() manual page was + written by Sergey Bronnikov.

+
+ blob - 7336ba7b1369dd09045687bfede86d0eea184649 blob + 35463db4706837ba6f87333fe001dda87b086948 --- lua_pushinteger.3.html +++ lua_pushinteger.3.html @@ -2,6 +2,7 @@ + LUA_PUSHINTEGER(3) @@ -14,30 +15,40 @@
July 20, 2022
-

-lua_pushinteger — -
pushes a number with value
-

-#include - <lua.h> -
-void -
-lua_pushinteger(lua_State - *L, lua_Integer - n); -

-lua_pushinteger() pushes a number with value - n onto the stack. -

+

lua_pushinteger — + pushes a number with value

+
+
+

+

#include + <lua.h>

+

void +
+ lua_pushinteger(lua_State + *L, lua_Integer + n);

+
+
+

+

() + pushes a number with value n onto the stack.

+
+
+

-Roberto Ierusalimschy, - Luiz Henrique de Figueiredo, and - Waldemar Celes, Lua 5.1 Reference - Manual. -

-The lua_pushinteger() manual page was written - by Sergey Bronnikov.

+

Roberto Ierusalimschy, + Luiz Henrique de Figueiredo, and + Waldemar Celes, Lua 5.1 Reference + Manual.

+ +
+

+

The lua_pushinteger() manual page was + written by Sergey Bronnikov.

+
+ blob - 5baef8d0656b61dae693063d6aa179beb987a303 blob + 495fa16060db6934569dc96e1947d69e4c365605 --- lua_pushlightuserdata.3.html +++ lua_pushlightuserdata.3.html @@ -2,6 +2,7 @@ + LUA_PUSHLIGHTUSERDATA(3) @@ -14,36 +15,45 @@
July 18, 2022
-

-lua_pushlightuserdata — -
pushes a light userdata onto the stack
-

-#include - <lua.h> -
-void -
-lua_pushlightuserdata(lua_State - *L, void - *p); -

-lua_pushlightuserdata() pushes a light - userdata onto the stack. -
-Userdata represent C values in Lua. A light - userdata represents a pointer. It is a value (like a number): you do not - create it, it has no individual metatable, and it is not collected (as it was - never created). A light userdata is equal to "any" light userdata - with the same C address. -

+

lua_pushlightuserdata — + pushes a light userdata onto the stack

+
+
+

+

#include + <lua.h>

+

void +
+ lua_pushlightuserdata(lua_State + *L, void *p);

+
+
+

+

() + pushes a light userdata onto the stack.

+

Userdata represent C values in Lua. A + + represents a pointer. It is a value (like a number): you do not create it, + it has no individual metatable, and it is not collected (as it was never + created). A light userdata is equal to "any" light userdata with + the same C address.

+
+
+

-Roberto Ierusalimschy, - Luiz Henrique de Figueiredo, and - Waldemar Celes, Lua 5.1 Reference - Manual. -

-The lua_pushlightuserdata() manual page was - written by Sergey Bronnikov.

+

Roberto Ierusalimschy, + Luiz Henrique de Figueiredo, and + Waldemar Celes, Lua 5.1 Reference + Manual.

+ +
+

+

The lua_pushlightuserdata() manual page + was written by Sergey Bronnikov.

+
+ blob - 7b1e2cb76bac3a4d92fcf08250450e0058052525 blob + 8f21b6dce7ed5f8c5950d93fb4c783f5e03746c3 --- lua_pushliteral.3.html +++ lua_pushliteral.3.html @@ -2,6 +2,7 @@ + LUA_PUSHLITERAL(3) @@ -14,35 +15,44 @@
July 18, 2022
-

-lua_pushliteral — -
pushes the string onto the stack
-

-#include - <lua.h> -
-void -
-lua_pushliteral(lua_State - *L, const char - *s); -

-lua_pushliteral() pushes the string pointed - to by s onto the stack. This macro is - equivalent to lua_pushlstring(3), but can be used - only when s is a literal string. In these - cases, it automatically provides the string length. -

+

lua_pushliteral — + pushes the string onto the stack

+
+
+

+

#include + <lua.h>

+

void +
+ lua_pushliteral(lua_State + *L, const char + *s);

+
+
+

+

() + pushes the string pointed to by s onto the stack. This + macro is equivalent to lua_pushlstring(3), but can be used + only when s is a literal string. In these cases, it + automatically provides the string length.

+
+
+

-lua_pushlstring(3) -
-Roberto Ierusalimschy, - Luiz Henrique de Figueiredo, and - Waldemar Celes, Lua 5.1 Reference - Manual. -

-The lua_pushliteral() manual page was written - by Sergey Bronnikov.

+

lua_pushlstring(3)

+

Roberto Ierusalimschy, + Luiz Henrique de Figueiredo, and + Waldemar Celes, Lua 5.1 Reference + Manual.

+ +
+

+

The lua_pushliteral() manual page was + written by Sergey Bronnikov.

+
+ blob - 4f84b751f7e68ca94c9e98372a202c007a7424dd blob + 3d266217acb8eb46e789a9b63997aa92f3a40225 --- lua_pushlstring.3.html +++ lua_pushlstring.3.html @@ -2,6 +2,7 @@ + LUA_PUSHLSTRING(3) @@ -14,36 +15,44 @@
July 18, 2022
-

-lua_pushlstring — -
pushes the string onto the stack
-

-#include - <lua.h> -
-void -
-lua_pushlstring(lua_State - *L, const char - *s, size_t - len); -

-lua_pushlstring() pushes the string pointed - to by s with size - len onto the stack. -
-Lua makes (or reuses) an internal copy of the given string, so the memory at - s can be freed or reused immediately after - the function returns. The string can contain embedded zeros. -

+

lua_pushlstring — + pushes the string onto the stack

+
+
+

+

#include + <lua.h>

+

void +
+ lua_pushlstring(lua_State + *L, const char *s, + size_t len);

+
+
+

+

() + pushes the string pointed to by s with size + len onto the stack.

+

Lua makes (or reuses) an internal copy of the given string, so the + memory at s can be freed or reused immediately after + the function returns. The string can contain embedded zeros.

+
+
+

-Roberto Ierusalimschy, - Luiz Henrique de Figueiredo, and - Waldemar Celes, Lua 5.1 Reference - Manual. -

-The lua_pushlstring() manual page was written - by Sergey Bronnikov.

+

Roberto Ierusalimschy, + Luiz Henrique de Figueiredo, and + Waldemar Celes, Lua 5.1 Reference + Manual.

+ +
+

+

The lua_pushlstring() manual page was + written by Sergey Bronnikov.

+
+ blob - 81e9b09fa43c8f15742019051dd4858f0279a0d0 blob + 5495062c1504019f3091ea5fda6594a0bce19351 --- lua_pushnil.3.html +++ lua_pushnil.3.html @@ -2,6 +2,7 @@ + LUA_PUSHNIL(3) @@ -14,29 +15,39 @@
July 20, 2022
-

-lua_pushnil — -
pushes a nil value onto the stack
-

-#include - <lua.h> -
-void -
-lua_pushnil(lua_State - *L); -

-lua_pushnil() pushes a nil value onto the - stack. -

+

lua_pushnil — + pushes a nil value onto the stack

+
+
+

+

#include + <lua.h>

+

void +
+ lua_pushnil(lua_State + *L);

+
+
+

+

() + pushes a nil value onto the stack.

+
+
+

-Roberto Ierusalimschy, - Luiz Henrique de Figueiredo, and - Waldemar Celes, Lua 5.1 Reference - Manual. -

-The lua_pushnil() manual page was written by - Sergey Bronnikov.

+

Roberto Ierusalimschy, + Luiz Henrique de Figueiredo, and + Waldemar Celes, Lua 5.1 Reference + Manual.

+ +
+

+

The lua_pushnil() manual page was written + by Sergey Bronnikov.

+
+ blob - dc90e96cb382e3b6c74e985cf543c51118989fd2 blob + d893fa1f8a3f1efed4fd743bb2bf83a94c9bc71f --- lua_pushnumber.3.html +++ lua_pushnumber.3.html @@ -2,6 +2,7 @@ + LUA_PUSHNUMBER(3) @@ -14,30 +15,40 @@
July 18, 2022
-

-lua_pushnumber — -
pushes a number onto the stack
-

-#include - <lua.h> -
-void -
-lua_pushnumber(lua_State - *L, lua_Number - n); -

-lua_pushnumber() pushes a number with value - n onto the stack. -

+

lua_pushnumber — + pushes a number onto the stack

+
+
+

+

#include + <lua.h>

+

void +
+ lua_pushnumber(lua_State + *L, lua_Number + n);

+
+
+

+

() + pushes a number with value n onto the stack.

+
+
+

-Roberto Ierusalimschy, - Luiz Henrique de Figueiredo, and - Waldemar Celes, Lua 5.1 Reference - Manual. -

-The lua_pushnumber() manual page was written - by Sergey Bronnikov.

+

Roberto Ierusalimschy, + Luiz Henrique de Figueiredo, and + Waldemar Celes, Lua 5.1 Reference + Manual.

+ +
+

+

The lua_pushnumber() manual page was + written by Sergey Bronnikov.

+
+ blob - 786cb95ba70b1f0e5cd2f020dcc7ece978a3c4b8 blob + 8ca3e69f4a62193265b4926f9fb9969fd9363158 --- lua_pushstring.3.html +++ lua_pushstring.3.html @@ -2,6 +2,7 @@ + LUA_PUSHSTRING(3) @@ -14,35 +15,44 @@
July 18, 2022
-

-lua_pushstring — -
pushes the zero-terminated string onto the - stack
-

-#include - <lua.h> -
-void -
-lua_pushstring(lua_State - *L, const char - *s); -

-lua_pushstring() pushes the zero-terminated - string pointed to by s onto the stack. Lua - makes (or reuses) an internal copy of the given string, so the memory at - s can be freed or reused immediately after - the function returns. The string cannot contain embedded zeros; it is assumed - to end at the first zero. -

+

lua_pushstring — + pushes the zero-terminated string onto the stack

+
+
+

+

#include + <lua.h>

+

void +
+ lua_pushstring(lua_State + *L, const char + *s);

+
+
+

+

() + pushes the zero-terminated string pointed to by s onto + the stack. Lua makes (or reuses) an internal copy of the given string, so + the memory at s can be freed or reused immediately + after the function returns. The string cannot contain embedded zeros; it is + assumed to end at the first zero.

+
+
+

-Roberto Ierusalimschy, - Luiz Henrique de Figueiredo, and - Waldemar Celes, Lua 5.1 Reference - Manual. -

-The lua_pushstring() manual page was written - by Sergey Bronnikov.

+

Roberto Ierusalimschy, + Luiz Henrique de Figueiredo, and + Waldemar Celes, Lua 5.1 Reference + Manual.

+ +
+

+

The lua_pushstring() manual page was + written by Sergey Bronnikov.

+
+ blob - f7846e7b49ce4cb31ee723001ff382ff7a432b3c blob + 745981c8fe9f22d0c77b7922f58b54626d64692a --- lua_pushthread.3.html +++ lua_pushthread.3.html @@ -2,6 +2,7 @@ + LUA_PUSHTHREAD(3) @@ -14,30 +15,40 @@
July 18, 2022
-

-lua_pushthread — -
pushes the thread onto the stack
-

-#include - <lua.h> -
-int -
-lua_pushthread(lua_State - *L); -

-lua_pushthread() pushes the thread - represented by L onto the stack. Returns 1 if - this thread is the main thread of its state. -

+

lua_pushthread — + pushes the thread onto the stack

+
+
+

+

#include + <lua.h>

+

int +
+ lua_pushthread(lua_State + *L);

+
+
+

+

() + pushes the thread represented by L onto the stack. + Returns 1 if this thread is the main thread of its state.

+
+
+

-Roberto Ierusalimschy, - Luiz Henrique de Figueiredo, and - Waldemar Celes, Lua 5.1 Reference - Manual. -

-The lua_pushthread() manual page was written - by Sergey Bronnikov.

+

Roberto Ierusalimschy, + Luiz Henrique de Figueiredo, and + Waldemar Celes, Lua 5.1 Reference + Manual.

+ +
+

+

The lua_pushthread() manual page was + written by Sergey Bronnikov.

+
+ blob - e6836c9f9fccb5854620582bf10c600f6ac824e9 blob + 09513dc90db71f80e94ef47180d2e62f270b197b --- lua_pushvalue.3.html +++ lua_pushvalue.3.html @@ -2,6 +2,7 @@ + LUA_PUSHVALUE(3) @@ -14,30 +15,39 @@
July 18, 2022
-

-lua_pushvalue — -
pushes a copy of the element onto the stack
-

-#include - <lua.h> -
-void -
-lua_pushvalue(lua_State - *L, int - index); -

-lua_pushvalue() pushes a copy of the element - at the given valid index onto the stack. -

+

lua_pushvalue — + pushes a copy of the element onto the stack

+
+
+

+

#include + <lua.h>

+

void +
+ lua_pushvalue(lua_State + *L, int index);

+
+
+

+

() + pushes a copy of the element at the given valid index onto the stack.

+
+
+

-Roberto Ierusalimschy, - Luiz Henrique de Figueiredo, and - Waldemar Celes, Lua 5.1 Reference - Manual. -

-The lua_pushvalue() manual page was written - by Sergey Bronnikov.

+

Roberto Ierusalimschy, + Luiz Henrique de Figueiredo, and + Waldemar Celes, Lua 5.1 Reference + Manual.

+ +
+

+

The lua_pushvalue() manual page was + written by Sergey Bronnikov.

+
+ blob - ccb21a45e1f345829fd7f5ee691778bbcd9fe4f1 blob + 88e86629d1aa7b8148197ac1770336a06cf0fa2b --- lua_pushvfstring.3.html +++ lua_pushvfstring.3.html @@ -2,6 +2,7 @@ + LUA_PUSHVFSTRING(3) @@ -14,37 +15,46 @@
July 18, 2022
-

-lua_pushvfstring — -
pushes onto the stack a formatted string and returns - a pointer to this string
-

-#include - <lua.h> -
-const char * -
-lua_pushvfstring(lua_State - *L, const char - *fmt, va_list - argp); -

-lua_pushvfstring() pushes onto the stack a - formatted string and returns a pointer to this string. Equivalent to - lua_pushfstring(3), except that it receives a - va_list instead of a variable number of - arguments. -

+

lua_pushvfstring — + pushes onto the stack a formatted string and returns a + pointer to this string

+
+
+

+

#include + <lua.h>

+

const char * +
+ lua_pushvfstring(lua_State + *L, const char + *fmt, va_list + argp);

+
+
+

+

() + pushes onto the stack a formatted string and returns a pointer to this + string. Equivalent to lua_pushfstring(3), except that it + receives a va_list instead of a variable number of + arguments.

+
+
+

-lua_pushfstring(3) -
-Roberto Ierusalimschy, - Luiz Henrique de Figueiredo, and - Waldemar Celes, Lua 5.1 Reference - Manual. -

-The lua_pushvfstring() manual page was - written by Sergey Bronnikov.

+

lua_pushfstring(3)

+

Roberto Ierusalimschy, + Luiz Henrique de Figueiredo, and + Waldemar Celes, Lua 5.1 Reference + Manual.

+ +
+

+

The lua_pushvfstring() manual page was + written by Sergey Bronnikov.

+
+ blob - 08148ee26876b25f1aa0037fe6bc0858413bc224 blob + 1c6feac9232ec6ea8481db891992e54f74f96f0c --- lua_rawequal.3.html +++ lua_rawequal.3.html @@ -2,6 +2,7 @@ + LUA_RAWEQUAL(3) @@ -14,35 +15,44 @@
July 18, 2022
-

-lua_rawequal — -
compare two values for equality without calling - metamethods
-

-#include - <lua.h> -
-int -
-lua_rawequal(lua_State - *L, int - index1, int - index2); -

-lua_rawequal() returns 1 if the two values in - acceptable indices index1 and - index2 are primitively equal (that is, - without calling metamethods). Otherwise returns 0. Also returns 0 if any of - the indices are non valid. -

+

lua_rawequal — + compare two values for equality without calling + metamethods

+
+
+

+

#include + <lua.h>

+

int +
+ lua_rawequal(lua_State + *L, int index1, + int index2);

+
+
+

+

() + returns 1 if the two values in acceptable indices + index1 and index2 are + primitively equal (that is, without calling metamethods). Otherwise returns + 0. Also returns 0 if any of the indices are non valid.

+
+
+

-Roberto Ierusalimschy, - Luiz Henrique de Figueiredo, and - Waldemar Celes, Lua 5.1 Reference - Manual. -

-The lua_rawequal() manual page was written by - Sergey Bronnikov.

+

Roberto Ierusalimschy, + Luiz Henrique de Figueiredo, and + Waldemar Celes, Lua 5.1 Reference + Manual.

+ +
+

+

The lua_rawequal() manual page was written + by Sergey Bronnikov.

+
+ blob - c64320a743c39859e628cec980a0ccea8c47e0ec blob + b7d1c470a279ff6f23aad279da2be9fb6842d780 --- lua_rawget.3.html +++ lua_rawget.3.html @@ -2,6 +2,7 @@ + LUA_RAWGET(3) @@ -14,35 +15,43 @@
July 18, 2022
-

-lua_rawget — -
pops the key from the stack
-

-#include - <lua.h> -
-void -
-lua_rawget(lua_State - *L, int - index); -

-lua_rawget() pops the key from the stack - (putting the resulting value in its place). As in Lua, this function may - trigger a metamethod for the “index” event. Similar to - lua_gettable(3), but does a raw access (i.e., - without metamethods). -

+

lua_rawgetpops + the key from the stack

+
+
+

+

#include + <lua.h>

+

void +
+ lua_rawget(lua_State + *L, int index);

+
+
+

+

() + pops the key from the stack (putting the resulting value in its place). As + in Lua, this function may trigger a metamethod for the "index" + event. Similar to lua_gettable(3), but does a raw access + (i.e., without metamethods).

+
+
+

-lua_gettable(3) -
-Roberto Ierusalimschy, - Luiz Henrique de Figueiredo, and - Waldemar Celes, Lua 5.1 Reference - Manual. -

-The lua_rawget() manual page was written by - Sergey Bronnikov.

+

lua_gettable(3)

+

Roberto Ierusalimschy, + Luiz Henrique de Figueiredo, and + Waldemar Celes, Lua 5.1 Reference + Manual.

+ +
+

+

The lua_rawget() manual page was written + by Sergey Bronnikov.

+
+ blob - 08c93585a730669a4a10d07c1a16d3fdf9c6ce75 blob + b89cd3bb0bdb3bad4617cb821403d05e4e6a1519 --- lua_rawgeti.3.html +++ lua_rawgeti.3.html @@ -2,6 +2,7 @@ + LUA_RAWGETI(3) @@ -14,33 +15,42 @@
July 15, 2022
-

-lua_rawgeti — -
pushes onto the stack the value t[n], where t is the - value at the given valid index
-

-#include - <lua.h> -
-void -
-lua_rawgeti(lua_State - *L, int - index, int - n); -

-lua_rawgeti() pushes onto the stack the value - t[n], where t is the value at the given valid index. The access is raw; that - is, it does not invoke metamethods. -

+

lua_rawgeti — + pushes onto the stack the value t[n], where t is the value + at the given valid index

+
+
+

+

#include + <lua.h>

+

void +
+ lua_rawgeti(lua_State + *L, int index, + int n);

+
+
+

+

() + pushes onto the stack the value t[n], where t is the value at the given + valid index. The access is raw; that is, it does not invoke metamethods.

+
+
+

-Roberto Ierusalimschy, - Luiz Henrique de Figueiredo, and - Waldemar Celes, Lua 5.1 Reference - Manual. -

-The lua_rawgeti() manual page was written by - Sergey Bronnikov.

+

Roberto Ierusalimschy, + Luiz Henrique de Figueiredo, and + Waldemar Celes, Lua 5.1 Reference + Manual.

+ +
+

+

The lua_rawgeti() manual page was written + by Sergey Bronnikov.

+
+ blob - a65ed0bd0ffc8611062ee5bf3f235da7ff628e84 blob + 11c26c047fe0b74c6c6336504a1ae592be0fbb27 --- lua_rawset.3.html +++ lua_rawset.3.html @@ -2,6 +2,7 @@ + LUA_RAWSET(3) @@ -14,35 +15,43 @@
July 15, 2022
-

-lua_rawset — -
pops both the key and the value from the stack
-

-#include - <lua.h> -
-void -
-lua_rawset(lua_State - *L, int - index); -

-lua_rawset() pops both the key and the value - from the stack. As in Lua, this function may trigger a metamethod for the - "newindex" event. Similar to - lua_settable(3), but does a raw assignment (i.e., - without metamethods). -

+

lua_rawsetpops + both the key and the value from the stack

+
+
+

+

#include + <lua.h>

+

void +
+ lua_rawset(lua_State + *L, int index);

+
+
+

+

() + pops both the key and the value from the stack. As in Lua, this function may + trigger a metamethod for the "newindex" event. Similar to + lua_settable(3), but does a raw assignment (i.e., without + metamethods).

+
+
+

-lua_settable(3) -
-Roberto Ierusalimschy, - Luiz Henrique de Figueiredo, and - Waldemar Celes, Lua 5.1 Reference - Manual. -

-The lua_rawset() manual page was written by - Sergey Bronnikov.

+

lua_settable(3)

+

Roberto Ierusalimschy, + Luiz Henrique de Figueiredo, and + Waldemar Celes, Lua 5.1 Reference + Manual.

+ +
+

+

The lua_rawset() manual page was written + by Sergey Bronnikov.

+
+ blob - 4b0132f7add25926a3e83ab2762ccac40e703611 blob + 3f75cb6b945759ff813b29b32a1fe397800cb7b3 --- lua_rawseti.3.html +++ lua_rawseti.3.html @@ -2,6 +2,7 @@ + LUA_RAWSETI(3) @@ -14,35 +15,43 @@
July 15, 2022
-

-lua_rawseti — -
pops the value from the stack
-

-#include - <lua.h> -
-void -
-lua_rawseti(lua_State - *L, int - index, int - n); -

-lua_rawseti() does the equivalent of t[n] = - v, where t is the value at the given valid index and v is the value at the top - of the stack. -
-This function pops the value from the stack. The assignment is raw; that is, it - does not invoke metamethods. -

+

lua_rawsetipops + the value from the stack

+
+
+

+

#include + <lua.h>

+

void +
+ lua_rawseti(lua_State + *L, int index, + int n);

+
+
+

+

() + does the equivalent of t[n] = v, where t is the value at the given valid + index and v is the value at the top of the stack.

+

This function pops the value from the stack. The assignment is + raw; that is, it does not invoke metamethods.

+
+
+

-Roberto Ierusalimschy, - Luiz Henrique de Figueiredo, and - Waldemar Celes, Lua 5.1 Reference - Manual. -

-The lua_rawseti() manual page was written by - Sergey Bronnikov.

+

Roberto Ierusalimschy, + Luiz Henrique de Figueiredo, and + Waldemar Celes, Lua 5.1 Reference + Manual.

+ +
+

+

The lua_rawseti() manual page was written + by Sergey Bronnikov.

+
+ blob - bde49108c7e1fa362d6e7a17697214a6989cace9 blob + af9298e07e43da98e5f2d9d9f4839ca6782e632d --- lua_register.3.html +++ lua_register.3.html @@ -2,6 +2,7 @@ + LUA_REGISTER(3) @@ -14,40 +15,47 @@
July 15, 2022
-

-lua_register — -
sets the C function as the new value of global - name
-

-#include - <lua.h> -
-void -
-lua_register(lua_State - *L, const char - *name, - lua_CFunction - f); -

-lua_register() sets the C function - f as the new value of global name. It is - defined as a macro: -
-
-
-#define lua_register(L,n,f) (lua_pushcfunction(L, f), lua_setglobal(L, n))
-
+
+

+

lua_register — + sets the C function as the new value of global + name

+
+
+

+

#include + <lua.h>

+

void +
+ lua_register(lua_State + *L, const char + *name, lua_CFunction + f);

+
+
+

+

() + sets the C function f as the new value of global name. + It is defined as a macro:

+

+
+
#define lua_register(L,n,f) (lua_pushcfunction(L, f), lua_setglobal(L, n))
-

-Roberto Ierusalimschy, - Luiz Henrique de Figueiredo, and - Waldemar Celes, Lua 5.1 Reference - Manual. -

-The lua_register() manual page was written by - Sergey Bronnikov.
+

Roberto Ierusalimschy, + Luiz Henrique de Figueiredo, and + Waldemar Celes, Lua 5.1 Reference + Manual.

+ +
+

+

The lua_register() manual page was written + by Sergey Bronnikov.

+
+
blob - 5e9a5529279fb0da4ed0e470333e49bc14d52c9d blob + fc2a15cf0acf63610d303904194a4c2c4bf67ba1 --- lua_remove.3.html +++ lua_remove.3.html @@ -2,6 +2,7 @@ + LUA_REMOVE(3) @@ -14,32 +15,41 @@
July 18, 2022
-

-lua_remove — -
removes the element at the given index
-

-#include - <lua.h> -
-void -
-lua_remove(lua_State - *L, int - index); -

-lua_remove() removes the element at the given - valid index, shifting down the elements above this index to fill the gap. - Cannot be called with a pseudo-index, because a pseudo-index is not an actual - stack position. -

+

lua_remove — + removes the element at the given index

+
+
+

+

#include + <lua.h>

+

void +
+ lua_remove(lua_State + *L, int index);

+
+
+

+

() + removes the element at the given valid index, shifting down the elements + above this index to fill the gap. Cannot be called with a pseudo-index, + because a pseudo-index is not an actual stack position.

+
+
+

-Roberto Ierusalimschy, - Luiz Henrique de Figueiredo, and - Waldemar Celes, Lua 5.1 Reference - Manual. -

-The lua_remove() manual page was written by - Sergey Bronnikov.

+

Roberto Ierusalimschy, + Luiz Henrique de Figueiredo, and + Waldemar Celes, Lua 5.1 Reference + Manual.

+ +
+

+

The lua_remove() manual page was written + by Sergey Bronnikov.

+
+ blob - 1d646ed5c7e44b94a4195ebd2ae4ce169c121aa3 blob + 06a84fab6300edd0f52ffbe6d4f0d7523c56afbe --- lua_replace.3.html +++ lua_replace.3.html @@ -2,6 +2,7 @@ + LUA_REPLACE(3) @@ -14,31 +15,41 @@
July 15, 2022
-

-lua_replace — -
moves the top element into the given position
-

-#include - <lua.h> -
-void -
-lua_replace(lua_State - *L, int - index); -

-lua_replace() moves the top element into the - given position (and pops it), without shifting any element (therefore - replacing the value at the given position). -

+

lua_replace — + moves the top element into the given position

+
+
+

+

#include + <lua.h>

+

void +
+ lua_replace(lua_State + *L, int index);

+
+
+

+

() + moves the top element into the given position (and pops it), without + shifting any element (therefore replacing the value at the given + position).

+
+
+

-Roberto Ierusalimschy, - Luiz Henrique de Figueiredo, and - Waldemar Celes, Lua 5.1 Reference - Manual. -

-The lua_replace() manual page was written by - Sergey Bronnikov.

+

Roberto Ierusalimschy, + Luiz Henrique de Figueiredo, and + Waldemar Celes, Lua 5.1 Reference + Manual.

+ +
+

+

The lua_replace() manual page was written + by Sergey Bronnikov.

+
+ blob - dcd711db2c4ab3550b103c7680d2716b0c467c94 blob + 1247b36e8e78b7f9cf908c4e03d558a537d6b953 --- lua_resume.3.html +++ lua_resume.3.html @@ -2,6 +2,7 @@ + LUA_RESUME(3) @@ -14,52 +15,59 @@
July 15, 2022
-

-lua_resume — -
starts and resumes a coroutine in a given - thread
-

-#include - <lua.h> -
-int -
-lua_resume(lua_State - *L, int - narg); -

-lua_resume() starts and resumes a coroutine - in a given thread. -
-To start a coroutine, you first create a new thread (see - lua_newthread(3) ); then you push onto its stack - the main function plus any arguments; then you call lua_resume, with narg - being the number of arguments. This call returns when the coroutine suspends - or finishes its execution. When it returns, the stack contains all values - passed to lua_yield(3), or all values returned by - the body function. In case of errors, the stack is not unwound, so you can use - the debug API over it. The error message is on the top of the stack. To - restart a coroutine, you put on its stack only the values to be passed as - results from yield, and then call lua_resume. -

+

lua_resume — + starts and resumes a coroutine in a given thread

+
+
+

+

#include + <lua.h>

+

int +
+ lua_resume(lua_State + *L, int narg);

+
+
+

+

() + starts and resumes a coroutine in a given thread.

+

To start a coroutine, you first create a new thread (see + lua_newthread(3) ); then you push onto its stack the main + function plus any arguments; then you call lua_resume, with narg being the + number of arguments. This call returns when the coroutine suspends or + finishes its execution. When it returns, the stack contains all values + passed to lua_yield(3), or all values returned by the body + function. In case of errors, the stack is not unwound, so you can use the + debug API over it. The error message is on the top of the stack. To restart + a coroutine, you put on its stack only the values to be passed as results + from yield, and then call lua_resume.

+
+
+

-lua_resume() returns - LUA_YIELD if the coroutine yields, 0 if the - coroutine finishes its execution without errors, or an error code in case of - errors (see lua_pcall(3) ). -

lua_pcall(3) ).

+

+
+

-lua_newthread(3), - lua_pcall(3), - lua_yield(3) -
-Roberto Ierusalimschy, - Luiz Henrique de Figueiredo, and - Waldemar Celes, Lua 5.1 Reference - Manual. -

-The lua_resume() manual page was written by - Sergey Bronnikov.

+

lua_newthread(3), + lua_pcall(3), lua_yield(3)

+

Roberto Ierusalimschy, + Luiz Henrique de Figueiredo, and + Waldemar Celes, Lua 5.1 Reference + Manual.

+ +
+

+

The lua_resume() manual page was written + by Sergey Bronnikov.

+
+ blob - 7be37995f23efeb2681e11fd104ecd85ef20800a blob + ba5f63f0f7fa1e65e0f25d9ce7fac1a2bc179006 --- lua_setallocf.3.html +++ lua_setallocf.3.html @@ -2,6 +2,7 @@ + LUA_SETALLOCF(3) @@ -14,32 +15,41 @@
July 15, 2022
-

-lua_setallocf — -
changes the allocator function
-

-#include - <lua.h> -
-void -
-lua_setallocf(lua_State - *L, lua_Alloc - f, void - *ud); -

-lua_setallocf() changes the allocator - function of a given state to f with user data - ud. -

+

lua_setallocf — + changes the allocator function

+
+
+

+

#include + <lua.h>

+

void +
+ lua_setallocf(lua_State + *L, lua_Alloc f, + void *ud);

+
+
+

+

() + changes the allocator function of a given state to f + with user data ud.

+
+
+

-Roberto Ierusalimschy, - Luiz Henrique de Figueiredo, and - Waldemar Celes, Lua 5.1 Reference - Manual. -

-The lua_setallocf() manual page was written - by Sergey Bronnikov.

+

Roberto Ierusalimschy, + Luiz Henrique de Figueiredo, and + Waldemar Celes, Lua 5.1 Reference + Manual.

+ +
+

+

The lua_setallocf() manual page was + written by Sergey Bronnikov.

+
+ blob - 07a08b3f68a7c3dea30f1485a09cdda6e827b07f blob + 7a24aad602e6cef23d8f393e1ee0860bc31c46ac --- lua_setfenv.3.html +++ lua_setfenv.3.html @@ -2,6 +2,7 @@ + LUA_SETFENV(3) @@ -14,36 +15,48 @@
July 15, 2022
-

-lua_setfenv — -
pops a table from the stack and sets it as the new - environment for the value
-

-#include - <lua.h> -
-int -
-lua_setfenv(lua_State - *L, int - index); -

-lua_setfenv() pops a table from the stack and - sets it as the new environment for the value at the given index. -

+

lua_setfenvpops + a table from the stack and sets it as the new environment for the + value

+
+
+

+

#include + <lua.h>

+

int +
+ lua_setfenv(lua_State + *L, int index);

+
+
+

+

() + pops a table from the stack and sets it as the new environment for the value + at the given index.

+
+
+

-If the value at the given index is neither a function nor a thread nor a - userdata, lua_setfenv() returns 0. - Otherwise it returns 1. -

-Roberto Ierusalimschy, - Luiz Henrique de Figueiredo, and - Waldemar Celes, Lua 5.1 Reference - Manual. -

-The lua_setfenv() manual page was written by - Sergey Bronnikov.

+

Roberto Ierusalimschy, + Luiz Henrique de Figueiredo, and + Waldemar Celes, Lua 5.1 Reference + Manual.

+ +
+

+

The lua_setfenv() manual page was written + by Sergey Bronnikov.

+
+ blob - 83fdeb6b4e746db5b5a349c1f16d5efb51c74a39 blob + 723fee038558434fa63622573799104437e9dd1d --- lua_setfield.3.html +++ lua_setfield.3.html @@ -2,6 +2,7 @@ + LUA_SETFIELD(3) @@ -14,35 +15,43 @@
July 15, 2022
-

-lua_setfield — -
pops the value from the stack
-

-#include - <lua.h> -
-void -
-lua_setfield(lua_State - *L, int - index, const - char *k); -

-lua_setfield() does the equivalent to t[k] = - v, where t is the value at the given valid index and v is the value at the top - of the stack. -
-This function pops the value from the stack. As in Lua, this function may - trigger a metamethod for the “newindex” event. -

+

lua_setfield — + pops the value from the stack

+
+
+

+

#include + <lua.h>

+

void +
+ lua_setfield(lua_State + *L, int index, + const char *k);

+
+
+

+

() + does the equivalent to t[k] = v, where t is the value at the given valid + index and v is the value at the top of the stack.

+

This function pops the value from the stack. As in Lua, this + function may trigger a metamethod for the "newindex" event.

+
+
+

-Roberto Ierusalimschy, - Luiz Henrique de Figueiredo, and - Waldemar Celes, Lua 5.1 Reference - Manual. -

-The lua_setfield() manual page was written by - Sergey Bronnikov.

+

Roberto Ierusalimschy, + Luiz Henrique de Figueiredo, and + Waldemar Celes, Lua 5.1 Reference + Manual.

+ +
+

+

The lua_setfield() manual page was written + by Sergey Bronnikov.

+
+ blob - 3fb204ea1639a67066b2d47fd6267d25b261687f blob + 9f4725bc512fff407b0f3fcc9db1c44d640f850d --- lua_setglobal.3.html +++ lua_setglobal.3.html @@ -2,6 +2,7 @@ + LUA_SETGLOBAL(3) @@ -14,34 +15,44 @@
July 15, 2022
-

-lua_setglobal — -
pops a value from the stack and sets it as the new - value of global name
-

-#include - <lua.h> -
-void -
-lua_setglobal(lua_State - *L, const char - *name); -

-lua_setglobal() pops a value from the stack - and sets it as the new value of global name. It is defined as a macro: -
-#define lua_setglobal(L,s) lua_setfield(L, - LUA_GLOBALSINDEX, s) -

+

lua_setglobal — + pops a value from the stack and sets it as the new value of + global name

+
+
+

+

#include + <lua.h>

+

void +
+ lua_setglobal(lua_State + *L, const char + *name);

+
+
+

+

() + pops a value from the stack and sets it as the new value of global name. It + is defined as a macro:

+

#define lua_setglobal(L,s) lua_setfield(L, + LUA_GLOBALSINDEX, s)

+
+
+

-Roberto Ierusalimschy, - Luiz Henrique de Figueiredo, and - Waldemar Celes, Lua 5.1 Reference - Manual. -

-The lua_setglobal() manual page was written - by Sergey Bronnikov.

+

Roberto Ierusalimschy, + Luiz Henrique de Figueiredo, and + Waldemar Celes, Lua 5.1 Reference + Manual.

+ +
+

+

The lua_setglobal() manual page was + written by Sergey Bronnikov.

+
+ blob - 798851f82d85a07efe66cfd7362c9f6954533d58 blob + 35aa1ff8dc80867ee2dc1283038f7d935eea1099 --- lua_sethook.3.html +++ lua_sethook.3.html @@ -2,6 +2,7 @@ + LUA_SETHOOK(3) @@ -14,69 +15,70 @@
July 20, 2022
-

-lua_sethook — -
sets the debugging hook function
-

-#include - <fcntl.h> -
-int -
-lua_sethook(lua_State - *L, lua_Hook - f, int - mask, int - count); -

-lua_sethook() sets the debugging hook - function. -
-Argument f is the hook function. mask specifies on which events the hook will be - called: it is formed by a bitwise or of the constants - LUA_MASKCALL, - LUA_MASKRET, - LUA_MASKLINE, and - LUA_MASKCOUNT. The count argument is only - meaningful when the mask includes - LUA_MASKCOUNT. For each event, the hook is - called as explained below: +
+

+

lua_sethooksets + the debugging hook function

+
+
+

+

#include + <fcntl.h>

+

int +
+ lua_sethook(lua_State + *L, lua_Hook f, + int mask, + int count);

+
+
+

+

() + sets the debugging hook function.

+

Argument f is the hook function. mask specifies on which events + the hook will be called: it is formed by a bitwise or of the constants + LUA_MASKCALL, LUA_MASKRET, + LUA_MASKLINE, and + LUA_MASKCOUNT. The count argument is only meaningful + when the mask includes LUA_MASKCOUNT. For each + event, the hook is called as explained below:

-
 
-
 
-
The call hook:
+
is called when the interpreter calls a function. The hook is called just after Lua enters the new function, before the function gets its arguments.
-
 
-
 
-
The return hook:
+
is called when the interpreter returns from a function. The hook is called just before Lua leaves the function. You have no access to the values to be returned by the function.
-
 
-
 
-
The line hook:
+
is called when the interpreter is about to start the execution of a new line of code, or when it jumps back in the code (even to the same line). (This event only happens while Lua is executing a Lua function.)
-
 
-
 
-
The count hook:
+
is called after the interpreter executes every count instructions. (This event only happens while Lua is executing a Lua function.)
-
-A hook is disabled by setting mask to zero. -

-Roberto Ierusalimschy, - Luiz Henrique de Figueiredo, and - Waldemar Celes, Lua 5.1 Reference - Manual. -

-The lua_sethook() manual page was written by - Sergey Bronnikov.
+

Roberto Ierusalimschy, + Luiz Henrique de Figueiredo, and + Waldemar Celes, Lua 5.1 Reference + Manual.

+ +
+

+

The lua_sethook() manual page was written + by Sergey Bronnikov.

+
+ blob - 4461427693b95a9d62a75ee6b1540f5cbdeea150 blob + 87b2f19abb48eb95969c5f105f13a3cf1e312a72 --- lua_setlocal.3.html +++ lua_setlocal.3.html @@ -2,6 +2,7 @@ + LUA_SETLOCAL(3) @@ -14,41 +15,51 @@
July 18, 2022
-

-lua_setlocal — -
sets the value of a local variable of a given - activation record
-

-#include - <lua.h> -
-const char * -
-lua_setlocal(lua_State - *L, lua_Debug - *ar, int - n); -

-lua_setlocal() sets the value of a local - variable of a given activation record. Parameters - ar and n are - as in lua_getlocal(3). - lua_setlocal() assigns the value at the top - of the stack to the variable and returns its name. It also pops the value from - the stack. -

+

lua_setlocal — + sets the value of a local variable of a given activation + record

+
+
+

+

#include + <lua.h>

+

const char * +
+ lua_setlocal(lua_State + *L, lua_Debug *ar, + int n);

+
+
+

+

() + sets the value of a local variable of a given activation record. Parameters + ar and n are as in + lua_getlocal(3). lua_setlocal() + assigns the value at the top of the stack to the variable and returns its + name. It also pops the value from the stack.

+
+
+

-Returns NULL (and pops nothing) when the - index is greater than the number of active local variables. -

-Roberto Ierusalimschy, - Luiz Henrique de Figueiredo, and - Waldemar Celes, Lua 5.1 Reference - Manual. -

-The lua_setlocal() manual page was written by - Sergey Bronnikov.

+

Roberto Ierusalimschy, + Luiz Henrique de Figueiredo, and + Waldemar Celes, Lua 5.1 Reference + Manual.

+ +
+

+

The lua_setlocal() manual page was written + by Sergey Bronnikov.

+
+ blob - e18229e41275ac16d7134af06abf4605e0ae84fd blob + 51e599e1aaad76767c594064928e92dcd1fb2ea0 --- lua_setmetatable.3.html +++ lua_setmetatable.3.html @@ -2,6 +2,7 @@ + LUA_SETMETATABLE(3) @@ -14,32 +15,41 @@
July 13, 2022
-

-lua_setmetatable — -
pops a table from the stack and sets it as the new - metatable for the value
-

-#include - <lua.h> -
-int -
-lua_setmetatable(lua_State - *L, int - index); -

-lua_setmetatable() pops a table from the - stack and sets it as the new metatable for the value at the given acceptable - index. -

+

lua_setmetatable — + pops a table from the stack and sets it as the new + metatable for the value

+
+
+

+

#include + <lua.h>

+

int +
+ lua_setmetatable(lua_State + *L, int index);

+
+
+

+

() + pops a table from the stack and sets it as the new metatable for the value + at the given acceptable index.

+
+
+

-Roberto Ierusalimschy, - Luiz Henrique de Figueiredo, and - Waldemar Celes, Lua 5.1 Reference - Manual. -

-The lua_setmetatable() manual page was - written by Sergey Bronnikov.

+

Roberto Ierusalimschy, + Luiz Henrique de Figueiredo, and + Waldemar Celes, Lua 5.1 Reference + Manual.

+ +
+

+

The lua_setmetatable() manual page was + written by Sergey Bronnikov.

+
+ blob - de6b8ba98ccd0be1583e948fa10de3e4ce43a709 blob + 990dd15715a933de95e481233cc604c5b86e9d9c --- lua_settable.3.html +++ lua_settable.3.html @@ -2,6 +2,7 @@ + LUA_SETTABLE(3) @@ -14,34 +15,44 @@
July 15, 2022
-

-lua_settable — -
pops both the key and the value from the stack
-

-#include - <lua.h> -
-void -
-lua_settable(lua_State - *L, int - index); -

-lua_settable() does the equivalent to t[k] = - v, where t is the value at the given valid index, v is the value at the top of - the stack, and k is the value just below the top. -
-This function pops both the key and the value from the stack. As in Lua, this - function may trigger a metamethod for the “newindex” event. -

+

lua_settable — + pops both the key and the value from the stack

+
+
+

+

#include + <lua.h>

+

void +
+ lua_settable(lua_State + *L, int index);

+
+
+

+

() + does the equivalent to t[k] = v, where t is the value at the given valid + index, v is the value at the top of the stack, and k is the value just below + the top.

+

This function pops both the key and the value from the stack. As + in Lua, this function may trigger a metamethod for the "newindex" + event.

+
+
+

-Roberto Ierusalimschy, - Luiz Henrique de Figueiredo, and - Waldemar Celes, Lua 5.1 Reference - Manual. -

-The lua_settable() manual page was written by - Sergey Bronnikov.

+

Roberto Ierusalimschy, + Luiz Henrique de Figueiredo, and + Waldemar Celes, Lua 5.1 Reference + Manual.

+ +
+

+

The lua_settable() manual page was written + by Sergey Bronnikov.

+
+ blob - bd328f28c2866512f68a7774cd7349bd35fcef04 blob + 0c7b9e5f365cedb18f6070c4b8de7047943cd1b1 --- lua_settop.3.html +++ lua_settop.3.html @@ -2,6 +2,7 @@ + LUA_SETTOP(3) @@ -14,33 +15,42 @@
July 15, 2022
-

-lua_settop — -
sets the stack top to the index
-

-#include - <lua.h> -
-void -
-lua_settop(lua_State - *L, int - index); -

-lua_settop() accepts any acceptable index, or - 0, and sets the stack top to this index. If the new top is larger than the old - one, then the new elements are filled with - nil. If index is 0, then all stack elements - are removed. -

+

lua_settopsets + the stack top to the index

+
+
+

+

#include + <lua.h>

+

void +
+ lua_settop(lua_State + *L, int index);

+
+
+

+

() + accepts any acceptable index, or 0, and sets the stack top to this index. If + the new top is larger than the old one, then the new elements are filled + with nil. If index is 0, then all stack elements are + removed.

+
+
+

-Roberto Ierusalimschy, - Luiz Henrique de Figueiredo, and - Waldemar Celes, Lua 5.1 Reference - Manual. -

-The lua_settop() manual page was written by - Sergey Bronnikov.

+

Roberto Ierusalimschy, + Luiz Henrique de Figueiredo, and + Waldemar Celes, Lua 5.1 Reference + Manual.

+ +
+

+

The lua_settop() manual page was written + by Sergey Bronnikov.

+
+ blob - 0053db79e2a421a64802c94e7c04bd9cd5ecd163 blob + b2e6fa303aae657b54cb7ed5ab605173fc8bfa8a --- lua_setupvalue.3.html +++ lua_setupvalue.3.html @@ -2,6 +2,7 @@ + LUA_SETUPVALUE(3) @@ -14,39 +15,50 @@
July 15, 2022
-

-lua_setupvalue — -
sets the value of a closure's upvalue
-

-#include - <lua.h> -
-const char * -
-lua_setupvalue(lua_State - *L, int - funcindex, int - n); -

-lua_setupvalue() sets the value of a - closure's upvalue. It assigns the value at the top of the stack to the upvalue - and returns its name. It also pops the value from the stack. Parameters - funcindex and - n are as in the - lua_getupvalue(3). -

+

lua_setupvalue — + sets the value of a closure's upvalue

+
+
+

+

#include + <lua.h>

+

const char * +
+ lua_setupvalue(lua_State + *L, int funcindex, + int n);

+
+
+

+

() + sets the value of a closure's upvalue. It assigns the value at the top of + the stack to the upvalue and returns its name. It also pops the value from + the stack. Parameters funcindex and + n are as in the + lua_getupvalue(3).

+
+
+

-Returns NULL (and pops nothing) when the - index is greater than the number of upvalues. -

-Roberto Ierusalimschy, - Luiz Henrique de Figueiredo, and - Waldemar Celes, Lua 5.1 Reference - Manual. -

-The lua_setupvalue() manual page was written - by Sergey Bronnikov.

+

Roberto Ierusalimschy, + Luiz Henrique de Figueiredo, and + Waldemar Celes, Lua 5.1 Reference + Manual.

+ +
+

+

The lua_setupvalue() manual page was + written by Sergey Bronnikov.

+
+ blob - bfedf774065b128c7fdf122b063953548f031832 blob + d09fe5194bb4f5b4ceef4738b1dda1b48f758b95 --- lua_status.3.html +++ lua_status.3.html @@ -2,6 +2,7 @@ + LUA_STATUS(3) @@ -14,34 +15,46 @@
July 13, 2022
-

-lua_status — -
returns the status of the thread L
-

-#include - <lua.h> -
-int -
-lua_status(lua_State - *L); -

-lua_status() returns the status of the thread - L. -

+

lua_status — + returns the status of the thread L

+
+
+

+

#include + <lua.h>

+

int +
+ lua_status(lua_State + *L);

+
+
+

+

() + returns the status of the thread L.

+
+
+

-The status can be 0 for a normal thread, an error code if the thread finished - its execution with an error, or LUA_YIELD - if the thread is suspended. -

-Roberto Ierusalimschy, - Luiz Henrique de Figueiredo, and - Waldemar Celes, Lua 5.1 Reference - Manual. -

-The lua_status() manual page was written by - Sergey Bronnikov.

+

Roberto Ierusalimschy, + Luiz Henrique de Figueiredo, and + Waldemar Celes, Lua 5.1 Reference + Manual.

+ +
+

+

The lua_status() manual page was written + by Sergey Bronnikov.

+
+ blob - 2ad766fc1eee3a5eef43b1ba93f9132d8fe2a345 blob + 7bb125cd458f1c8b91f838ecc022021319b94b41 --- lua_toboolean.3.html +++ lua_toboolean.3.html @@ -2,6 +2,7 @@ + LUA_TOBOOLEAN(3) @@ -14,40 +15,52 @@
July 14, 2022
-

-lua_toboolean — -
converts the Lua value to a C boolean value
-

-#include - <lua.h> -
-int -
-lua_toboolean(lua_State - *L, int - index); -

-lua_toboolean() converts the Lua value at the - given acceptable index to a C boolean value (0 or 1). -

+

lua_toboolean — + converts the Lua value to a C boolean value

+
+
+

+

#include + <lua.h>

+

int +
+ lua_toboolean(lua_State + *L, int index);

+
+
+

+

() + converts the Lua value at the given acceptable index to a C boolean value (0 + or 1).

+
+
+

-Like all tests in Lua, lua_toboolean() - returns 1 for any Lua value different from false - and nil; otherwise it returns 0. It also returns - 0 when called with a non-valid index. (If you want to accept only actual - boolean values, use lua_isboolean(3) to test the - value's type.) -

+ and ; + otherwise it returns 0. It also returns 0 when called with a non-valid + index. (If you want to accept only actual boolean values, use + lua_isboolean(3) to test the value's type.)

+

+
+

-lua_isboolean(3) -
-Roberto Ierusalimschy, - Luiz Henrique de Figueiredo, and - Waldemar Celes, Lua 5.1 Reference - Manual. -

-The lua_toboolean() manual page was written - by Sergey Bronnikov.

+

lua_isboolean(3)

+

Roberto Ierusalimschy, + Luiz Henrique de Figueiredo, and + Waldemar Celes, Lua 5.1 Reference + Manual.

+ +
+

+

The lua_toboolean() manual page was + written by Sergey Bronnikov.

+
+ blob - 61e7b2d122fd2ab37d9f453633b6266eb87bd4ca blob + f94968879d120d81c6cb39970d79ee9f56a59050 --- lua_tocfunction.3.html +++ lua_tocfunction.3.html @@ -2,6 +2,7 @@ + LUA_TOCFUNCTION(3) @@ -14,34 +15,45 @@
July 14, 2022
-

-lua_tocfunction — -
converts a value to a C function
-

-#include - <lua.h> -
-lua_CFunction -
-lua_tocfunction(lua_State - *L, int - index); -

-lua_tocfunction() converts a value at the - given acceptable index to a C function. -

+

lua_tocfunction — + converts a value to a C function

+
+
+

+

#include + <lua.h>

+

lua_CFunction +
+ lua_tocfunction(lua_State + *L, int index);

+
+
+

+

() + converts a value at the given acceptable index to a C function.

+
+
+

-That value must be a C function; otherwise, returns - NULL. -

-Roberto Ierusalimschy, - Luiz Henrique de Figueiredo, and - Waldemar Celes, Lua 5.1 Reference - Manual. -

-The lua_tocfunction() manual page was written - by Sergey Bronnikov.

+

Roberto Ierusalimschy, + Luiz Henrique de Figueiredo, and + Waldemar Celes, Lua 5.1 Reference + Manual.

+ +
+

+

The lua_tocfunction() manual page was + written by Sergey Bronnikov.

+
+ blob - 12d64c44201435af5c114c875c8d0bbe7ea2b1b1 blob + e07fbeb5165d55655a8b6aebec721af452490d1d --- lua_tointeger.3.html +++ lua_tointeger.3.html @@ -2,6 +2,7 @@ + LUA_TOINTEGER(3) @@ -14,40 +15,50 @@
July 14, 2022
-

-lua_tointeger — -
converts the Lua value to the signed integral - type
-

-#include - <lua.h> -
-lua_Integer -
-lua_tointeger(lua_State - *L, int - index); -

-lua_tointeger() converts the Lua value at the - given acceptable index to the signed integral type - lua_Integer(3). -

+

lua_tointeger — + converts the Lua value to the signed integral + type

+
+
+

+

#include + <lua.h>

+

lua_Integer +
+ lua_tointeger(lua_State + *L, int index);

+
+
+

+

() + converts the Lua value at the given acceptable index to the signed integral + type lua_Integer(3).

+
+
+

-The Lua value must be a number or a string convertible to a number; otherwise, - lua_tointeger() returns 0. -
-If the number is not an integer, it is truncated in some non-specified way. -

-lua_Integer(3) -
-Roberto Ierusalimschy, - Luiz Henrique de Figueiredo, and - Waldemar Celes, Lua 5.1 Reference - Manual. -

-The lua_tointeger() manual page was written - by Sergey Bronnikov.

+

lua_Integer(3)

+

Roberto Ierusalimschy, + Luiz Henrique de Figueiredo, and + Waldemar Celes, Lua 5.1 Reference + Manual.

+ +
+

+

The lua_tointeger() manual page was + written by Sergey Bronnikov.

+
+ blob - 074505e00093a2ef598e6f2e2aae8c22f250960d blob + a47c16aaa0b18b9907d8389cbe08bf7a835258cc --- lua_tolstring.3.html +++ lua_tolstring.3.html @@ -2,6 +2,7 @@ + LUA_TOLSTRING(3) @@ -14,50 +15,59 @@
July 14, 2022
-

-lua_tolstring — -
converts the Lua value to a C string
-

-#include - <lua.h> -
-const char * -
-lua_tolstring(lua_State - *L, int - index, size_t - *len); -

-lua_tolstring() converts the Lua value at the - given acceptable index to a C string. If len - is not NULL, it also sets - *len with the string length. The Lua value - must be a string or a number; otherwise, the function returns - NULL. If the value is a number, then - lua_tolstring() also changes the actual - value in the stack to a string. (This change confuses - lua_next(3) when - lua_tolstring() is applied to keys during a - table traversal.) -

+

lua_tolstring — + converts the Lua value to a C string

+
+
+

+

#include + <lua.h>

+

const char * +
+ lua_tolstring(lua_State + *L, int index, + size_t *len);

+
+
+

+

() + converts the Lua value at the given acceptable index to a C string. If + len is not NULL, it also sets + *len with the string length. The Lua value must be a + string or a number; otherwise, the function returns + NULL. If the value is a number, then + lua_tolstring() also changes the actual value in the + stack to a string. (This change confuses lua_next(3) when + lua_tolstring() is applied to keys during a table + traversal.)

+
+
+

-lua_tolstring() returns a fully aligned - pointer to a string inside the Lua state. This string always has a zero ('\0') - after its last character (as in C), but can contain other zeros in its body. - Because Lua has garbage collection, there is no guarantee that the pointer - returned by lua_tolstring() will be valid - after the corresponding value is removed from the stack. -

-lua_next(3) -
-Roberto Ierusalimschy, - Luiz Henrique de Figueiredo, and - Waldemar Celes, Lua 5.1 Reference - Manual. -

-The lua_tolstring() manual page was written - by Sergey Bronnikov.

+

lua_next(3)

+

Roberto Ierusalimschy, + Luiz Henrique de Figueiredo, and + Waldemar Celes, Lua 5.1 Reference + Manual.

+ +
+

+

The lua_tolstring() manual page was + written by Sergey Bronnikov.

+
+ blob - 09460919092c4811bc4e476c12d3e47146a2e09f blob + 71d0fce94e6c2edb2bf60d20c9a9c924b2e22a1b --- lua_tonumber.3.html +++ lua_tonumber.3.html @@ -2,6 +2,7 @@ + LUA_TONUMBER(3) @@ -14,36 +15,44 @@
July 14, 2022
-

-lua_tonumber — -
converts the Lua value to the C type - lua_Number(3)
-

-#include - <lua.h> -
-lua_Number -
-lua_tonumber(lua_State - *L, int - index); -

-lua_tonumber() converts the Lua value at the - given acceptable index to the C type - lua_Number(3). The Lua value must be a number or - a string convertible to a number; otherwise, - lua_tonumber returns 0. -

+

lua_tonumber — + converts the Lua value to the C type + lua_Number(3)

+
+
+

+

#include + <lua.h>

+

lua_Number +
+ lua_tonumber(lua_State + *L, int index);

+
+
+

+

() + converts the Lua value at the given acceptable index to the C type + lua_Number(3). The Lua value must be a number or a string + convertible to a number; otherwise, lua_tonumber + returns 0.

+
+
+

-lua_Number(3) -
-Roberto Ierusalimschy, - Luiz Henrique de Figueiredo, and - Waldemar Celes, Lua 5.1 Reference - Manual. -

-The lua_tonumber() manual page was written by - Sergey Bronnikov.

+

lua_Number(3)

+

Roberto Ierusalimschy, + Luiz Henrique de Figueiredo, and + Waldemar Celes, Lua 5.1 Reference + Manual.

+ +
+

+

The lua_tonumber() manual page was written + by Sergey Bronnikov.

+
+ blob - b77da9da1dba5a10e83ecdf75c7e8cb1ac834b81 blob + a74c436bbc155035c457c33994d5d63f2b6a5767 --- lua_topointer.3.html +++ lua_topointer.3.html @@ -2,6 +2,7 @@ + LUA_TOPOINTER(3) @@ -14,36 +15,45 @@
July 18, 2022
-

-lua_topointer — -
converts the value to a generic C pointer
-

-#include - <lua.h> -
-const void * -
-lua_topointer(lua_State - *L, int - index); -

-lua_topointer() converts the value at the - given acceptable index to a generic C pointer (void*). The value can be a - userdata, a table, a thread, or a function; otherwise, - lua_topointer returns - NULL. Different objects will give different - pointers. There is no way to convert the pointer back to its original value. -
-Typically this function is used only for debug information. -

+

lua_topointer — + converts the value to a generic C pointer

+
+
+

+

#include + <lua.h>

+

const void * +
+ lua_topointer(lua_State + *L, int index);

+
+
+

+

() + converts the value at the given acceptable index to a generic C pointer + (void*). The value can be a userdata, a table, a thread, or a function; + otherwise, lua_topointer returns + NULL. Different objects will give different + pointers. There is no way to convert the pointer back to its original + value.

+

Typically this function is used only for debug information.

+
+
+

-Roberto Ierusalimschy, - Luiz Henrique de Figueiredo, and - Waldemar Celes, Lua 5.1 Reference - Manual. -

-The lua_topointer() manual page was written - by Sergey Bronnikov.

+

Roberto Ierusalimschy, + Luiz Henrique de Figueiredo, and + Waldemar Celes, Lua 5.1 Reference + Manual.

+ +
+

+

The lua_topointer() manual page was + written by Sergey Bronnikov.

+
+ blob - 173199f9dbf25fb04bc9eb2b5cf91abe6f01ede0 blob + 22f7502700250fe6bb691f83d96c3e4dd37e4ce8 --- lua_tostring.3.html +++ lua_tostring.3.html @@ -2,6 +2,7 @@ + LUA_TOSTRING(3) @@ -14,35 +15,42 @@
July 18, 2022
-

-lua_tostring — -
converts the Lua value to a C string
-

-#include - <lua.h> -
-const char * -
-lua_tostring(lua_State - *L, int - index); -

-lua_tostring() converts the Lua value at the - given acceptable index to a C string. -
-Equivalent to lua_tolstring(3) with len equal to - NULL. -

+

lua_tostring — + converts the Lua value to a C string

+
+
+

+

#include + <lua.h>

+

const char * +
+ lua_tostring(lua_State + *L, int index);

+
+
+

+

() + converts the Lua value at the given acceptable index to a C string.

+

Equivalent to lua_tolstring(3) with len equal to + NULL.

+
+
+

-lua_tolstring(3) -
-Roberto Ierusalimschy, - Luiz Henrique de Figueiredo, and - Waldemar Celes, Lua 5.1 Reference - Manual. -

-The lua_tostring() manual page was written by - Sergey Bronnikov.

+

lua_tolstring(3)

+

Roberto Ierusalimschy, + Luiz Henrique de Figueiredo, and + Waldemar Celes, Lua 5.1 Reference + Manual.

+ +
+

+

The lua_tostring() manual page was written + by Sergey Bronnikov.

+
+ blob - 190ffc83aec291e2ad6f03d935fa2f4ef5aef9dd blob + 7af7da32cc25d76983d0a9b31a61258c97d01381 --- lua_tothread.3.html +++ lua_tothread.3.html @@ -2,6 +2,7 @@ + LUA_TOTHREAD(3) @@ -14,36 +15,47 @@
July 15, 2022
-

-lua_tothread — -
converts the value to a Lua thread
-

-#include - <lua.h> -
-lua_State * -
-lua_tothread(lua_State - *L, int - index); -

-lua_tothread() converts the value at the - given acceptable index to a Lua thread (represented as lua_State *). This - value must be a thread; otherwise, the function returns - NULL. -

+

lua_tothread — + converts the value to a Lua thread

+
+
+

+

#include + <lua.h>

+

lua_State * +
+ lua_tothread(lua_State + *L, int index);

+
+
+

+

() + converts the value at the given acceptable index to a Lua thread + (represented as lua_State *). This value must be a thread; otherwise, the + function returns NULL.

+
+
+

-Returns Lua thread represented as lua_State* and returns - NULL when value is not a thread. -

-Roberto Ierusalimschy, - Luiz Henrique de Figueiredo, and - Waldemar Celes, Lua 5.1 Reference - Manual. -

-The lua_gethook() manual page was written by - Sergey Bronnikov.

+

Roberto Ierusalimschy, + Luiz Henrique de Figueiredo, and + Waldemar Celes, Lua 5.1 Reference + Manual.

+ +
+

+

The lua_gethook() manual page was written + by Sergey Bronnikov.

+
+ blob - 51a40bb1a996f85f39338f657a15f6c6dee342fb blob + d9721cb9ae218ad83aa4fdf3a03339d787feecdf --- lua_touserdata.3.html +++ lua_touserdata.3.html @@ -2,6 +2,7 @@ + LUA_TOUSERDATA(3) @@ -14,34 +15,45 @@
July 13, 2022
-

-lua_touserdata — -
returns address to userdata
-

-#include - <lua.h> -
-void * -
-lua_touserdata(lua_State - *L, int - index); -

-If the value at the given acceptable index is a full userdata, returns its block - address. -

+

lua_touserdata — + returns address to userdata

+
+
+

+

#include + <lua.h>

+

void * +
+ lua_touserdata(lua_State + *L, int index);

+
+
+

+

If the value at the given acceptable index is a full userdata, + returns its block address.

+
+
+

-If the value is a light userdata, returns its pointer. Otherwise, returns - NULL. -

-Roberto Ierusalimschy, - Luiz Henrique de Figueiredo, and - Waldemar Celes, Lua 5.1 Reference - Manual. -

-The lua_touserdata() manual page was written - by Sergey Bronnikov.

+

Roberto Ierusalimschy, + Luiz Henrique de Figueiredo, and + Waldemar Celes, Lua 5.1 Reference + Manual.

+ +
+

+

The lua_touserdata() manual page was + written by Sergey Bronnikov.

+
+ blob - 1d47f28cfab0a1f1f8505d019924af793f0b8968 blob + 3d26b27db77ebac7bb4c4a3b3ac16923376d9648 --- lua_type.3.html +++ lua_type.3.html @@ -2,6 +2,7 @@ + LUA_TYPE(3) @@ -14,43 +15,48 @@
July 13, 2022
-

-lua_type — -
returns the type of the value
-

-#include - <lua.h> -
-int -
-lua_type(lua_State - *L, int - index); -

-lua_type() returns the type of the value in - the given acceptable index, or LUA_TNONE - for a non-valid index (that is, an index to an "empty" stack - position). The types returned by lua_type - are coded by the following constants defined in - <lua.h>: - LUA_TNIL, - LUA_TNUMBER, - LUA_TBOOLEAN, - LUA_TSTRING, - LUA_TTABLE, - LUA_TFUNCTION, - LUA_TUSERDATA, - LUA_TTHREAD, and - LUA_TLIGHTUSERDATA. -

+

lua_typereturns + the type of the value

+
+
+

+

#include + <lua.h>

+

int +
+ lua_type(lua_State + *L, int index);

+
+
+

+

() + returns the type of the value in the given acceptable index, or + LUA_TNONE for a non-valid index (that is, an index + to an "empty" stack position). The types returned by + lua_type are coded by the following constants + defined in <lua.h>: + LUA_TNIL, LUA_TNUMBER, + LUA_TBOOLEAN, LUA_TSTRING, + LUA_TTABLE, LUA_TFUNCTION, + LUA_TUSERDATA, LUA_TTHREAD, + and LUA_TLIGHTUSERDATA.

+
+
+

-Roberto Ierusalimschy, - Luiz Henrique de Figueiredo, and - Waldemar Celes, Lua 5.1 Reference - Manual. -

-The lua_type() manual page was written by - Sergey Bronnikov.

+

Roberto Ierusalimschy, + Luiz Henrique de Figueiredo, and + Waldemar Celes, Lua 5.1 Reference + Manual.

+ +
+

+

The lua_type() manual page was written by + Sergey Bronnikov.

+
+ blob - 79e4e1395ab2662c4ed8c38cf2645d01bf887609 blob + 888bd0fdbb9fe05dbace480281843a63b6355057 --- lua_typename.3.html +++ lua_typename.3.html @@ -2,6 +2,7 @@ + LUA_TYPENAME(3) @@ -14,35 +15,46 @@
July 18, 2022
-

-lua_typename — -
returns the name of the type encoded by the - value
-

-#include - <lua.h> -
-const char * -
-lua_typename(lua_State - *L, int - tp); -

-lua_typename() returns the name of the type - encoded by the value tp, which must be one - the values returned by lua_type(3). -

+

lua_typename — + returns the name of the type encoded by the + value

+
+
+

+

#include + <lua.h>

+

const char * +
+ lua_typename(lua_State + *L, int tp);

+
+
+

+

() + returns the name of the type encoded by the value tp, + which must be one the values returned by lua_type(3).

+
+
+

-Returns the name of the type encoded by the value. -

-Roberto Ierusalimschy, - Luiz Henrique de Figueiredo, and - Waldemar Celes, Lua 5.1 Reference - Manual. -

-The lua_typename() manual page was written by - Sergey Bronnikov.

+

Roberto Ierusalimschy, + Luiz Henrique de Figueiredo, and + Waldemar Celes, Lua 5.1 Reference + Manual.

+ +
+

+

The lua_typename() manual page was written + by Sergey Bronnikov.

+
+ blob - 0b328b5b1bb6925d136401ab440a45f9238a7582 blob + 3882c6ce37341d0f193319f24d1e1036b7c0135c --- lua_xmove.3.html +++ lua_xmove.3.html @@ -2,6 +2,7 @@ + LUA_XMOVE(3) @@ -14,33 +15,43 @@
July 13, 2022
-

-lua_xmove — -
exchange values between different threads of the same - global state
-

-#include - <lua.h> -
-void -
-lua_xmove(lua_State - *from, lua_State - *to, int - n); -

-lua_xmove() exchange values between different - threads of the same global state. This function pops n values from the stack - from, and pushes them onto the stack to. -

+

lua_xmove — + exchange values between different threads of the same + global state

+
+
+

+

#include + <lua.h>

+

void +
+ lua_xmove(lua_State + *from, lua_State + *to, int n);

+
+
+

+

() + exchange values between different threads of the same global state. This + function pops n values from the stack from, and pushes them onto the stack + to.

+
+
+

-Roberto Ierusalimschy, - Luiz Henrique de Figueiredo, and - Waldemar Celes, Lua 5.1 Reference - Manual. -

-The lua_xmove() manual page was written by - Sergey Bronnikov.

+

Roberto Ierusalimschy, + Luiz Henrique de Figueiredo, and + Waldemar Celes, Lua 5.1 Reference + Manual.

+ +
+

+

The lua_xmove() manual page was written by + Sergey Bronnikov.

+
+ blob - 387cf8017db7dc41d81bcfe08cf19902ef33bd45 blob + 322a8fc0afadd0abdac0fbd6db173e87d528011c --- lua_yield.3.html +++ lua_yield.3.html @@ -2,6 +2,7 @@ + LUA_YIELD(3) @@ -14,43 +15,50 @@
July 13, 2022
-

-lua_yield — -
yields a coroutine
-

-#include - <lua.h> -
-int -
-lua_yield(lua_State - *L, int - nresults); -

-lua_yield() yields a coroutine. This function - should only be called as the return expression of a C function, as follows: -
-
-
-return lua_yield (L, nresults);
-
+
+

+

lua_yieldyields + a coroutine

+
+
+

+

#include + <lua.h>

+

int +
+ lua_yield(lua_State + *L, int + nresults);

+
+
+

+

() + yields a coroutine. This function should only be called as the return + expression of a C function, as follows:

+

+
+
return lua_yield (L, nresults);
-
-When a C function calls lua_yield in that - way, the running coroutine suspends its execution, and the call to lua_resume - that started this coroutine returns. The parameter - nresults is the number of values from the - stack that are passed as results to - lua_resume(3). -

lua_resume(3).

+

+
+

-Roberto Ierusalimschy, - Luiz Henrique de Figueiredo, and - Waldemar Celes, Lua 5.1 Reference - Manual. -

-The lua_yield() manual page was written by - Sergey Bronnikov.
+

Roberto Ierusalimschy, + Luiz Henrique de Figueiredo, and + Waldemar Celes, Lua 5.1 Reference + Manual.

+ +
+

+

The lua_yield() manual page was written by + Sergey Bronnikov.

+
+
blob - 2e49c3587aeb6736406345996519f400d28db750 (mode 644) blob + /dev/null --- style.css +++ /dev/null @@ -1,313 +0,0 @@ -/* Global defaults. */ - -html { max-width: 60rem; width: calc(100% - 2rem); margin: 0 auto;} -body { font-family: sans-serif; - font-size: 11pt; - padding-top: 4rem; - padding-bottom: 4rem; - line-height: 1.4em; - margin: 0; - font-weight: 400; } -pre { font-size: smaller; - line-height: 1.3em; - font-family: monospace; } -table { margin-top: 0em; - margin-bottom: 0em; - border-collapse: collapse; } -/* Some browsers set border-color in a browser style for tbody, - * but not for table, resulting in inconsistent border styling. */ -tbody { border-color: inherit; } -tr { border-color: inherit; } -td { vertical-align: top; - padding-left: 0.2em; - padding-right: 0.2em; - border-color: inherit; } -ul, ol, dl { margin-top: 0em; - margin-bottom: 0em; } -li, dt { margin-top: 1em; } - -.permalink { font: inherit; - text-decoration: inherit; } -* { clear: both } - -/* Header and footer lines. */ - -table.head { display: none; } -table.foot { display: none; } - -/* Sections and paragraphs. */ - -.Nd { } -section.Sh { } -h1.Sh { margin-top: 1.2em; - margin-bottom: 0.6em; - font-size: 110%; } -section.Ss { } -h2.Ss { margin-top: 1.2em; - margin-bottom: 0.6em; - font-size: 105%; } -.Pp { margin: 0.6em 0em; } -.Sx { } -.Xr { } - -/* Displays and lists. */ - -.Bd { } -.Bd-indent { margin-left: 3.8em; } - -.Bl-bullet { list-style-type: disc; - padding-left: 1em; } -.Bl-bullet > li { } -.Bl-dash { list-style-type: none; - padding-left: 0em; } -.Bl-dash > li:before { content: "\2014 "; } -.Bl-item { list-style-type: none; - padding-left: 0em; } -.Bl-item > li { } -.Bl-compact > li { margin-top: 0em; } - -.Bl-enum { padding-left: 2em; } -.Bl-enum > li { } -.Bl-compact > li { margin-top: 0em; } - -.Bl-diag { } -.Bl-diag > dt { font-style: normal; - font-weight: bold; } -.Bl-diag > dd { margin-left: 0em; } -.Bl-hang { } -.Bl-hang > dt { } -.Bl-hang > dd { margin-left: 5.5em; } -.Bl-inset { } -.Bl-inset > dt { } -.Bl-inset > dd { margin-left: 0em; } -.Bl-ohang { } -.Bl-ohang > dt { } -.Bl-ohang > dd { margin-left: 0em; } -.Bl-tag { margin-top: 0.6em; - margin-left: 5.5em; } -.Bl-tag > dt { float: left; - margin-top: 0em; - margin-left: -5.5em; - padding-right: 0.5em; - vertical-align: top; } -.Bl-tag > dd { clear: right; - width: calc(100% - 1em); - margin-top: 0em; - margin-left: 0em; - margin-bottom: 0.6em; - vertical-align: top; - overflow: auto; } -.Bl-compact { margin-top: 0em; } -.Bl-compact > dd { margin-bottom: 0em; } -.Bl-compact > dt { margin-top: 0em; } - -.Bl-column { } -.Bl-column > tbody > tr { } -.Bl-column > tbody > tr > td - { margin-top: 1em; } -.Bl-compact > tbody > tr > td - { margin-top: 0em; } - -.Rs { font-style: normal; - font-weight: normal; } -.RsA { } -.RsB { font-style: italic; - font-weight: normal; } -.RsC { } -.RsD { } -.RsI { font-style: italic; - font-weight: normal; } -.RsJ { font-style: italic; - font-weight: normal; } -.RsN { } -.RsO { } -.RsP { } -.RsQ { } -.RsR { } -.RsT { text-decoration: underline; } -.RsU { } -.RsV { } - -.eqn { } -.tbl td { vertical-align: middle; } - -.HP { margin-left: 3.8em; - text-indent: -3.8em; } - -/* Semantic markup for command line utilities. */ - -table.Nm { } -code.Nm { font-style: normal; - font-weight: bold; - font-family: inherit; } -.Fl { font-style: normal; - font-weight: bold; - font-family: inherit; } -.Cm { font-style: normal; - font-weight: bold; - font-family: inherit; } -.Ar { font-style: italic; - font-weight: normal; } -.Op { display: inline; } -.Ic { font-style: normal; - font-weight: bold; - font-family: inherit; } -.Ev { font-style: normal; - font-weight: normal; - font-size: smaller; - font-family: monospace; } -.Pa { font-style: italic; - font-weight: normal; } - -/* Semantic markup for function libraries. */ - -.Lb { } -code.In { font-style: normal; - font-weight: bold; - font-family: inherit; } -a.In { } -.Fd { font-style: normal; - font-weight: bold; - font-family: inherit; } -.Ft { font-style: italic; - font-weight: normal; } -.Fn { font-style: normal; - font-weight: bold; - font-family: inherit; } -.Fa { font-style: italic; - font-weight: normal; } -.Vt { font-style: italic; - font-weight: normal; } -.Va { font-style: italic; - font-weight: normal; } -.Dv { font-style: normal; - font-weight: normal; - font-size: smaller; - font-family: monospace; } -.Er { font-style: normal; - font-weight: normal; - font-size: smaller; - font-family: monospace; } - -/* Various semantic markup. */ - -.An { } -.Lk { } -.Mt { } -.Cd { font-style: normal; - font-weight: bold; - font-family: inherit; } -.Ad { font-style: italic; - font-weight: normal; } -.Ms { font-style: normal; - font-weight: bold; } -.St { } -.Ux { } - -/* Physical markup. */ - -.Bf { display: inline; } -.No { font-style: normal; - font-weight: normal; } -.Em { font-style: italic; - font-weight: normal; } -.Sy { font-style: normal; - font-weight: bold; } -.Li { font-style: normal; - font-weight: normal; - font-size: smaller; - font-family: monospace; } - -/* Tooltip support. */ - -h1.Sh, h2.Ss { position: relative; - font-weight: 500; } -.An, .Ar, .Cd, .Cm, .Dv, .Em, .Er, .Ev, .Fa, .Fd, .Fl, .Fn, .Ft, -.Ic, code.In, .Lb, .Lk, .Ms, .Mt, .Nd, code.Nm, .Pa, .Rs, -.St, .Sx, .Sy, .Va, .Vt, .Xr - { display: inline-block; - position: relative; } - -.An::before { content: "An"; } -.Ar::before { content: "Ar"; } -.Cd::before { content: "Cd"; } -.Cm::before { content: "Cm"; } -.Dv::before { content: "Dv"; } -.Em::before { content: "Em"; } -.Er::before { content: "Er"; } -.Ev::before { content: "Ev"; } -.Fa::before { content: "Fa"; } -.Fd::before { content: "Fd"; } -.Fl::before { content: "Fl"; } -.Fn::before { content: "Fn"; } -.Ft::before { content: "Ft"; } -.Ic::before { content: "Ic"; } -code.In::before { content: "In"; } -.Lb::before { content: "Lb"; } -.Lk::before { content: "Lk"; } -.Ms::before { content: "Ms"; } -.Mt::before { content: "Mt"; } -.Nd::before { content: "Nd"; } -code.Nm::before { content: "Nm"; } -.Pa::before { content: "Pa"; } -.Rs::before { content: "Rs"; } -h1.Sh::before { content: "Sh"; } -h2.Ss::before { content: "Ss"; } -.St::before { content: "St"; } -.Sx::before { content: "Sx"; } -.Sy::before { content: "Sy"; } -.Va::before { content: "Va"; } -.Vt::before { content: "Vt"; } -.Xr::before { content: "Xr"; } - -.An::before, .Ar::before, .Cd::before, .Cm::before, -.Dv::before, .Em::before, .Er::before, .Ev::before, -.Fa::before, .Fd::before, .Fl::before, .Fn::before, .Ft::before, -.Ic::before, code.In::before, .Lb::before, .Lk::before, -.Ms::before, .Mt::before, .Nd::before, code.Nm::before, -.Pa::before, .Rs::before, -h1.Sh::before, h2.Ss::before, .St::before, .Sx::before, .Sy::before, -.Va::before, .Vt::before, .Xr::before - { opacity: 0; - transition: .15s ease opacity; - pointer-events: none; - position: absolute; - bottom: 100%; - box-shadow: 0 0 .35em #000; - padding: .15em .25em; - white-space: nowrap; - font-family: Helvetica,Arial,sans-serif; - font-style: normal; - font-weight: bold; - color: black; - background: #fff; } -.An:hover::before, .Ar:hover::before, .Cd:hover::before, .Cm:hover::before, -.Dv:hover::before, .Em:hover::before, .Er:hover::before, .Ev:hover::before, -.Fa:hover::before, .Fd:hover::before, .Fl:hover::before, .Fn:hover::before, -.Ft:hover::before, .Ic:hover::before, code.In:hover::before, -.Lb:hover::before, .Lk:hover::before, .Ms:hover::before, .Mt:hover::before, -.Nd:hover::before, code.Nm:hover::before, .Pa:hover::before, -.Rs:hover::before, h1.Sh:hover::before, h2.Ss:hover::before, .St:hover::before, -.Sx:hover::before, .Sy:hover::before, .Va:hover::before, .Vt:hover::before, -.Xr:hover::before { opacity: 1; - pointer-events: inherit; } - -/* Overrides to avoid excessive margins on small devices. */ - -@media (max-width: 37.5em) { - body { padding-top: 1rem; - padding-bottom: 1rem; } - .Bd-indent { margin-left: 2em; } - .Bl-hang > dd { margin-left: 2em; } - .Bl-tag { margin-left: 2em; } - .Bl-tag > dt { margin-left: -2em; } - .HP { margin-left: 2em; - text-indent: -2em; } - pre { overflow: hidden; } -} - -@media (prefers-color-scheme: dark) { - body { background-color: #2d2d2d; - color: #eee; } - a, .permalink { color: yellow; } -}
July 18, 2022