Commit Graph
4 Commits
Author SHA1 Message Date
Harry Lawrence 0eecf9eeff docs: add doc comment for wrenGetArgumentBool describing usage constraints and parameter range 2015-01-19 14:52:30 +00:00
Harry Lawrence 672fdb51f1 feat: add wrenGetArgumentBool function to retrieve boolean foreign call arguments
Implement the wrenGetArgumentBool function in wren_vm.c, which retrieves a boolean value from the foreign call argument slot at the given index. The function includes assertions for valid call context, non-negative index, and argument bounds. Also add the corresponding declaration to the public wren.h header to expose the new API for foreign method implementations.
2015-01-19 14:40:37 +00:00
Harry Lawrence d74008b8eb docs: add documentation comment for wrenReturnBool function in wren.h header 2015-01-17 12:02:23 +00:00
Harry Lawrence 7fed1ef294 feat: add wrenReturnBool function to return boolean values from foreign calls
Add a new public API function `wrenReturnBool` that allows foreign function
implementations to return boolean values to Wren. The function validates
that it is called within a foreign call context using an assertion, then
writes the boolean value into the foreign call slot and clears the slot
pointer. This completes the set of return value helpers alongside the
existing `wrenReturnNull` and `wrenReturnString` functions.
2015-01-17 11:48:27 +00:00