summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorsanine-a <sanine.not@pm.me>2021-05-26 20:04:17 -0500
committersanine-a <sanine.not@pm.me>2021-05-26 20:04:17 -0500
commita1f5b414edccf584518e5829e9797931c791f3fc (patch)
tree918668783d7dbf9eac38d73c6d012fe562b995c2 /README.md
parent6e4b4d265e39bb5c208e733df00aedfcdf9333a7 (diff)
provide stack indices for args and add HS_ANY typecheck test
Diffstat (limited to 'README.md')
-rw-r--r--README.md6
1 files changed, 4 insertions, 2 deletions
diff --git a/README.md b/README.md
index 05f4ae7..33cdece 100644
--- a/README.md
+++ b/README.md
@@ -76,20 +76,22 @@ performs typechecking and in case of an error throws with helpful error
messages. `hs_parse_args_fast()` does not perform typechecking, and as a
result has much less friendly error messages.
-`HS_TBL`, `HS_FUNC`, `HS_NIL`, and `HS_ANY` do not take a pointer, and are
-simply used to confirm the presence of an argument on the stack.
+`HS_TBL`, `HS_FUNC`, `HS_NIL`, and `HS_ANY` take a pointer to an integer
+that will be filled with the stack index of the argument.
```C
int some_lua_binding(lua_State *L)
{
bool b;
int i;
+ int tbl_index;
lua_Number n;
char *str;
void* user;
hs_parse_args(L,
HS_BOOL, &b,
HS_INT, &i,
+ HS_TBL, &tbl_index,
HS_NUM, &n,
HS_STR, &str,
HS_USER, &user,