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

commonMain.org.luaj.vm2.NonTableMetatable.kt Maven / Gradle / Ivy

The newest version!
package org.luaj.vm2

import org.luaj.vm2.LuaTable.Slot

internal class NonTableMetatable(private val value: LuaValue) : Metatable {
    override fun useWeakKeys(): Boolean = false
    override fun useWeakValues(): Boolean = false
    override fun toLuaValue(): LuaValue = value
    override fun entry(key: LuaValue, value: LuaValue): Slot = LuaTable.defaultEntry(key, value)
    override fun wrap(value: LuaValue): LuaValue = value
    override fun arrayget(array: Array, index: Int): LuaValue? = array[index]
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy