mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Scribunto
synced 2024-12-18 02:41:09 +00:00
374972c924
Currently, the only way for PHP to pass a function to Lua is to pass back a function that it received from Lua. This means, for example, that PHP cannot implement a Lua iterator function except by registering a library holding the function or by using loadString. This changeset adds Scribunto_LuaInterpreter::wrapPhpFunction (and implements it for both LuaSandbox and LuaStandalone), which takes a PHP callable and returns a Lua function wrapping it. Note that fallback code is included so this does not depend on I2e552799. Change-Id: Ic0a98eec7cc17ef4b1acee032c0f42d617b998d2 |
||
---|---|---|
.. | ||
LuaCommon | ||
LuaSandbox | ||
LuaStandalone |