mediawiki-extensions-Scribunto/tests/engines/LuaCommon
Brad Jorsch 374972c924 Add Scribunto_LuaInterpreter::wrapPhpFunction
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
2013-01-09 05:54:36 +00:00
..
CommonTests.lua New parser interface 2012-05-22 14:18:49 +10:00
LuaEngineTest.php Make sure to call parent::setUp() 2012-12-20 11:43:03 -05:00
LuaEnvironmentComparisonTest.php Unit test: verify LuaSandbox and LuaStandalone are equivalent 2012-12-13 13:53:29 -05:00
LuaInterpreterTest.php Add Scribunto_LuaInterpreter::wrapPhpFunction 2013-01-09 05:54:36 +00:00
luaParserTests.txt Fixed transmission of \0 from Lua standalone 2012-12-03 17:46:11 +11:00