Path: blob/main/sys/contrib/openzfs/module/lua/lfunc.h
48383 views
// SPDX-License-Identifier: MIT1/*2** $Id: lfunc.h,v 2.8.1.1 2013/04/12 18:48:47 roberto Exp $3** Auxiliary functions to manipulate prototypes and closures4** See Copyright Notice in lua.h5*/67#ifndef lfunc_h8#define lfunc_h91011#include "lobject.h"121314#define sizeCclosure(n) (cast(int, sizeof(CClosure)) + \15cast(int, sizeof(TValue)*((n))))1617#define sizeLclosure(n) (cast(int, sizeof(LClosure)) + \18cast(int, sizeof(TValue *)*((n))))192021LUAI_FUNC Proto *luaF_newproto (lua_State *L);22LUAI_FUNC Closure *luaF_newCclosure (lua_State *L, int nelems);23LUAI_FUNC Closure *luaF_newLclosure (lua_State *L, int nelems);24LUAI_FUNC UpVal *luaF_newupval (lua_State *L);25LUAI_FUNC UpVal *luaF_findupval (lua_State *L, StkId level);26LUAI_FUNC void luaF_close (lua_State *L, StkId level);27LUAI_FUNC void luaF_freeproto (lua_State *L, Proto *f);28LUAI_FUNC void luaF_freeupval (lua_State *L, UpVal *uv);29LUAI_FUNC const char *luaF_getlocalname (const Proto *func, int local_number,30int pc);313233#endif343536