003 File Manager
Current Path:
/usr/src/sys/contrib/openzfs/module/lua
usr
/
src
/
sys
/
contrib
/
openzfs
/
module
/
lua
/
📁
..
📄
Makefile.in
(852 B)
📄
README.zfs
(3.38 KB)
📄
lapi.c
(30.73 KB)
📄
lapi.h
(583 B)
📄
lauxlib.c
(22.21 KB)
📄
lbaselib.c
(7.23 KB)
📄
lcode.c
(22.03 KB)
📄
lcode.h
(3.08 KB)
📄
lcompat.c
(1.43 KB)
📄
lcorolib.c
(3.59 KB)
📄
lctype.c
(2.26 KB)
📄
lctype.h
(1.83 KB)
📄
ldebug.c
(16.15 KB)
📄
ldebug.h
(1.1 KB)
📄
ldo.c
(22.2 KB)
📄
ldo.h
(1.53 KB)
📄
lfunc.c
(4.19 KB)
📄
lfunc.h
(1.06 KB)
📄
lgc.c
(36.9 KB)
📄
lgc.h
(5.31 KB)
📄
llex.c
(15.02 KB)
📄
llex.h
(2.18 KB)
📄
llimits.h
(7.73 KB)
📄
lmem.c
(2.61 KB)
📄
lmem.h
(1.79 KB)
📄
lobject.c
(7.68 KB)
📄
lobject.h
(14.62 KB)
📄
lopcodes.c
(3.04 KB)
📄
lopcodes.h
(8.32 KB)
📄
lparser.c
(45.19 KB)
📄
lparser.h
(3.29 KB)
📄
lstate.c
(7.54 KB)
📄
lstate.h
(7.46 KB)
📄
lstring.c
(4.85 KB)
📄
lstring.h
(1.28 KB)
📄
lstrlib.c
(28.3 KB)
📄
ltable.c
(16.18 KB)
📄
ltable.h
(1.42 KB)
📄
ltablib.c
(7.62 KB)
📄
ltm.c
(1.78 KB)
📄
ltm.h
(1.14 KB)
📄
lvm.c
(30.16 KB)
📄
lvm.h
(1.49 KB)
📄
lzio.c
(1.61 KB)
📄
lzio.h
(1.5 KB)
📁
setjmp
Editing: ltm.c
/* BEGIN CSTYLED */ /* ** $Id: ltm.c,v 2.14.1.1 2013/04/12 18:48:47 roberto Exp $ ** Tag methods ** See Copyright Notice in lua.h */ #define ltm_c #define LUA_CORE #include <sys/lua/lua.h> #include "lobject.h" #include "lstate.h" #include "lstring.h" #include "ltable.h" #include "ltm.h" static const char udatatypename[] = "userdata"; LUAI_DDEF const char *const luaT_typenames_[LUA_TOTALTAGS] = { "no value", "nil", "boolean", udatatypename, "number", "string", "table", "function", udatatypename, "thread", "proto", "upval" /* these last two cases are used for tests only */ }; void luaT_init (lua_State *L) { static const char *const luaT_eventname[] = { /* ORDER TM */ "__index", "__newindex", "__gc", "__mode", "__len", "__eq", "__add", "__sub", "__mul", "__div", "__mod", "__pow", "__unm", "__lt", "__le", "__concat", "__call" }; int i; for (i=0; i<TM_N; i++) { G(L)->tmname[i] = luaS_new(L, luaT_eventname[i]); luaS_fix(G(L)->tmname[i]); /* never collect these names */ } } /* ** function to be used with macro "fasttm": optimized for absence of ** tag methods */ const TValue *luaT_gettm (Table *events, TMS event, TString *ename) { const TValue *tm = luaH_getstr(events, ename); lua_assert(event <= TM_EQ); if (ttisnil(tm)) { /* no tag method? */ events->flags |= cast_byte(1u<<event); /* cache this fact */ return NULL; } else return tm; } const TValue *luaT_gettmbyobj (lua_State *L, const TValue *o, TMS event) { Table *mt; switch (ttypenv(o)) { case LUA_TTABLE: mt = hvalue(o)->metatable; break; case LUA_TUSERDATA: mt = uvalue(o)->metatable; break; default: mt = G(L)->mt[ttypenv(o)]; } return (mt ? luaH_getstr(mt, G(L)->tmname[event]) : luaO_nilobject); } /* END CSTYLED */
Upload File
Create Folder