Write lua_requiref in lua5.1

827 Views Asked by At

I would like to use the function lua_requiref, but in lua5.1. Is there a way to get the effect of

lua_requiref

in lua 5.1?

1

There are 1 best solutions below

0
On BEST ANSWER

Yes, you can use compat-5.3 to get many of the newer lua C API functions in lua 5.1 (and 5.2).

The particular function you're looking for (luaL_requiref) you can find here