@@ -1556,6 +1556,66 @@ public static int luaL_checkoption(MemorySegment L, int narg, MemorySegment def,
15561556 }
15571557 }
15581558
1559+ private static class luaL_tolstring {
1560+ public static final FunctionDescriptor DESC = FunctionDescriptor .of (
1561+ lualib_h .C_POINTER ,
1562+ lualib_h .C_POINTER ,
1563+ lualib_h .C_INT ,
1564+ lualib_h .C_POINTER
1565+ );
1566+
1567+ public static final MemorySegment ADDR = lualib_h .findOrThrow ("luaL_tolstring" );
1568+
1569+ public static final MethodHandle HANDLE = Linker .nativeLinker ().downcallHandle (ADDR , DESC );
1570+ }
1571+
1572+ /**
1573+ * Function descriptor for:
1574+ * {@snippet lang=c :
1575+ * extern const char *luaL_tolstring(lua_State *L, int idx, size_t *len)
1576+ * }
1577+ */
1578+ public static FunctionDescriptor luaL_tolstring$descriptor () {
1579+ return luaL_tolstring .DESC ;
1580+ }
1581+
1582+ /**
1583+ * Downcall method handle for:
1584+ * {@snippet lang=c :
1585+ * extern const char *luaL_tolstring(lua_State *L, int idx, size_t *len)
1586+ * }
1587+ */
1588+ public static MethodHandle luaL_tolstring$handle () {
1589+ return luaL_tolstring .HANDLE ;
1590+ }
1591+
1592+ /**
1593+ * Address for:
1594+ * {@snippet lang=c :
1595+ * extern const char *luaL_tolstring(lua_State *L, int idx, size_t *len)
1596+ * }
1597+ */
1598+ public static MemorySegment luaL_tolstring$address () {
1599+ return luaL_tolstring .ADDR ;
1600+ }
1601+
1602+ /**
1603+ * {@snippet lang=c :
1604+ * extern const char *luaL_tolstring(lua_State *L, int idx, size_t *len)
1605+ * }
1606+ */
1607+ public static MemorySegment luaL_tolstring (MemorySegment L , int idx , MemorySegment len ) {
1608+ var mh$ = luaL_tolstring .HANDLE ;
1609+ try {
1610+ if (TRACE_DOWNCALLS ) {
1611+ traceDowncall ("luaL_tolstring" , L , idx , len );
1612+ }
1613+ return (MemorySegment )mh$ .invokeExact (L , idx , len );
1614+ } catch (Throwable ex$ ) {
1615+ throw new AssertionError ("should not reach here" , ex$ );
1616+ }
1617+ }
1618+
15591619 private static class luaL_newstate {
15601620 public static final FunctionDescriptor DESC = FunctionDescriptor .of (
15611621 lualib_h .C_POINTER );
0 commit comments