blob: b09f9944e443d8433b561f7f5868f233d971cc70 [file] [log] [blame] [raw]
package li.cil.oc.util
import com.naef.jnlua.{JavaFunction, LuaState}
object ExtendedLuaState {
implicit def extendLuaState(state: LuaState) = new {
def pushScalaFunction(f: (LuaState) => Int) = state.pushJavaFunction(new JavaFunction {
override def invoke(state: LuaState) = f(state)
})
}
}