summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorsanine-a <sanine.not@pm.me>2021-07-02 22:02:06 -0500
committersanine-a <sanine.not@pm.me>2021-07-02 22:02:06 -0500
commit6416977ea7e2159a67fd6a9877c5e01abe2f8269 (patch)
tree84941ea147ade3eb3545048d6b7cf68b5ee29e0d /README.md
parent8c66847bfc4a6af1ca86e916b678a6b8ce58be2f (diff)
begin refactor of tests into individual source files
Diffstat (limited to 'README.md')
-rw-r--r--README.md12
1 files changed, 7 insertions, 5 deletions
diff --git a/README.md b/README.md
index 36d809f..2bcfa71 100644
--- a/README.md
+++ b/README.md
@@ -137,8 +137,9 @@ int overloaded_lua_binding(lua_State *L)
constant/value triplets, and finally `HS_END`. It returns the stack index of
the newly created table. Most of the type constants expect their associated
type (e.g. `HS_INT` expects an `int`, `HS_CFUNC` expects `lua_CFunction`,
-etc.) but `HS_FUNC` and `HS_TBL` expect an integer stack index. `hs_create_
-table()` automatically pops any stack indices provided to it.
+etc.) but `HS_FUNC` and `HS_TBL` expect an integer stack index. You cannot
+use `HS_NIL` or `HS_ANY` with this function. `hs_create_table()`
+automatically pops any stack indices provided to it.
```C
int *ptr; // some pointer
@@ -182,7 +183,8 @@ char *str = hs_enum_to_string(L, index, VALUE_3); // "three"
[(Back to top)](#table-of-contents)
`hs_process_table()` is intended for creating lua bindings that can be called
-like `set_config{ debug=true, verbosity=2, logfile='run.log' }`. It can only operate on stringly-keyed values.
+like `set_config{ debug=true, verbosity=2, logfile='run.log' }`. It can
+only operate on stringly-keyed values.
```C
void set_verbosity(int value, void *data) { // set verbosity level }
@@ -210,8 +212,8 @@ hs_process_table(L, tbl_index, NULL,
hs_throw_error(L, "ERROR: %d is not within range", 10);
```
-`hs_traceback()` can be supplied to `lua_pcall()` to get a helpful stack trace
-error message:
+`hs_traceback()` can be supplied to `lua_pcall()` to get a helpful stack
+trace error message:
```C
lua_pushcfunction(L, hs_traceback);