summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
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);