I too came across this omission when writing lua2c [1], which
translates Lua source to C code consisting of Lua C API calls. The
workaround I ended up doing was to code generate the equivalent
functions if the operations occurred in the Lua code. For example,
look at the output for bisect.c (based on bisect.lua) on the web page
[1]. I would prefer if Lua defined these functions itself, as that
would remove boilerplate from the lua2c output.
[1] http://lua-users.org/wiki/LuaToCee
The code templates used are copied at the bottom of this message.