All Downloads are FREE. Search and download functionalities are using the official Maven repository.

jvmTest.org.luaj.vm2.require.RequireSampleSuccess.kt Maven / Gradle / Ivy

There is a newer version: 4.0.0-alpha-2
Show newest version
package org.luaj.vm2.require

import org.luaj.vm2.LuaValue
import org.luaj.vm2.lib.TwoArgFunction

/**
 * This should succeed as a library that can be loaded dynamically via "require()"
 */
class RequireSampleSuccess : TwoArgFunction() {

    override fun call(modname: LuaValue, env: LuaValue): LuaValue {
        env.checkglobals()
        return LuaValue.valueOf("require-sample-success-" + modname.tojstring())
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy