Class Lua53

java.lang.Object
party.iroiro.luajava.AbstractLua
party.iroiro.luajava.lua53.Lua53
All Implemented Interfaces:
AutoCloseable, Lua, LuaThread

public class Lua53 extends AbstractLua
A thin wrapper around a Lua 5.3 Lua state
  • Constructor Details

    • Lua53

      public Lua53() throws LinkageError
      Creates a new Lua state
      Throws:
      LinkageError - if Lua 5.3 natives unavailable
    • Lua53

      protected Lua53(long L, int id, AbstractLua main)
  • Method Details

    • newThread

      protected AbstractLua newThread(long L, int id, AbstractLua mainThread)
      Description copied from class: AbstractLua
      Creates a new sub-thread attached to this main thread.
      Specified by:
      newThread in class AbstractLua
      Parameters:
      L - the pointer to the new Lua state
      id - the unique identifier for the new state
      mainThread - the main thread this state belongs to
      Returns:
      the new sub-thread
    • convertError

      public LuaException.LuaError convertError(int code)
      Description copied from class: AbstractLua
      Converts a native error code to a LuaError enum value.
      Specified by:
      convertError in class AbstractLua
      Parameters:
      code - the native error code
      Returns:
      the corresponding LuaError value
    • convertType

      public Lua.LuaType convertType(int code)
      Description copied from class: AbstractLua
      Converts a native type code to a LuaType enum value.
      Specified by:
      convertType in class AbstractLua
      Parameters:
      code - the native type code
      Returns:
      the corresponding LuaType value