This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
honeysuckle [2021/09/14 20:00] sanine [hs_vpushstring] |
honeysuckle [2021/09/14 20:18] (current) sanine [hs_process_table] |
||
---|---|---|---|
Line 1: | Line 1: | ||
====== honeysuckle ====== | ====== honeysuckle ====== | ||
- | honeysuckle is a C library intended to make creating Lua bindings simpler. It was originally a core part of the honey code, but was split out into its own library because it is useful in many other contexts. It provides functions for argument parsing, table creation and processing, error throwing and handling, | + | honeysuckle is a C library intended to make creating Lua bindings simpler. It was originally a core part of the honey code, but was split out into its own library because it is useful in many other contexts. It provides functions for argument parsing, table creation and processing, error throwing and handling, string wrangling, and registry operations. |
===== hs_parse_args ===== | ===== hs_parse_args ===== | ||
Line 176: | Line 176: | ||
=== Stack Modifications === | === Stack Modifications === | ||
- | [-0, +0, -]< | + | [-0, +0, e]< |
=== Parameters === | === Parameters === | ||
Line 199: | Line 199: | ||
For the extremely common case of simply setting a variable, there are provided the functions '' | For the extremely common case of simply setting a variable, there are provided the functions '' | ||
+ | |||
+ | This function may throw an error if the provided index is not valid or is not a table. It may trigger metamethods in extracting values. | ||
=== Example === | === Example === | ||
Line 236: | Line 238: | ||
=== Stack Modifications === | === Stack Modifications === | ||
- | [-0, +1, -]< | + | [-0, +1, m]< |
=== Parameters === | === Parameters === | ||
Line 243: | Line 245: | ||
* '' | * '' | ||
* '' | * '' | ||
+ | |||
+ | === Return Value === | ||
+ | |||
+ | None. | ||
=== Description === | === Description === | ||
Line 268: | Line 274: | ||
=== Stack Modifications === | === Stack Modifications === | ||
- | [-0, +0, -]< | + | [-0, +0, m]< |
=== Parameters === | === Parameters === | ||
Line 295: | Line 301: | ||
=== Stack Modifications === | === Stack Modifications === | ||
- | [-0, +0, -]< | + | [-0, +0, v]< |
=== Parameters === | === Parameters === | ||
Line 309: | Line 315: | ||
=== Description === | === Description === | ||
- | Similar to '' | + | Similar to '' |
===== hs_traceback ===== | ===== hs_traceback ===== | ||
Line 360: | Line 366: | ||
This function is exactly the same as '' | This function is exactly the same as '' | ||
+ | |||
+ | ===== hs_rstore ===== | ||
+ | |||
+ | <code C> | ||
+ | int hs_rstore(lua_State *L); | ||
+ | </ | ||
+ | |||
+ | === Stack Modifications === | ||
+ | |||
+ | [-1, +0, m]< | ||
+ | |||
+ | === Parameters === | ||
+ | |||
+ | * '' | ||
+ | |||
+ | === Return Value === | ||
+ | |||
+ | The reference key. | ||
+ | |||
+ | === Description === | ||
+ | |||
+ | This is a macro wrapper around '' | ||
+ | |||
+ | ===== hs_rload ===== | ||
+ | |||
+ | <code C> | ||
+ | void hs_rload( | ||
+ | lua_State *L, | ||
+ | int reference); | ||
+ | </ | ||
+ | |||
+ | === Stack Modifications === | ||
+ | |||
+ | [-0, +1, -]< | ||
+ | |||
+ | === Parameters === | ||
+ | |||
+ | * '' | ||
+ | * '' | ||
+ | |||
+ | === Return Value === | ||
+ | |||
+ | None. | ||
+ | |||
+ | === Description === | ||
+ | |||
+ | This is a macro wrapper around '' | ||
+ | |||
+ | ===== hs_rdel ===== | ||
+ | |||
+ | <code C> | ||
+ | void hs_rdel( | ||
+ | lua_State *L, | ||
+ | int reference); | ||
+ | </ | ||
+ | |||
+ | === Stack Modifications === | ||
+ | |||
+ | [-0, +0, -]< | ||
+ | |||
+ | === Parameters === | ||
+ | |||
+ | * '' | ||
+ | * '' | ||
+ | |||
+ | === Return Value === | ||
+ | |||
+ | The reference key. | ||
+ | |||
+ | === Description === | ||
+ | |||
+ | This is a macro wrapper around '' |