private typeOf ( IntPtr luaState, int idx ) : Type | ||
luaState | IntPtr | |
idx | int | |
return | Type |
private Type typeOf(IntPtr luaState, int idx)
{
int udata=LuaDLL.luanet_checkudata(luaState,1,"luaNet_class");
if (udata == -1) {
return null;
} else {
ProxyType pt = (ProxyType)objects[udata];
return pt.UnderlyingSystemType;
}
}
public static int ctype(IntPtr luaState) { ObjectTranslator translator = ObjectTranslator.FromState(luaState); Type t = translator.typeOf(luaState, 1); if (t == null) { return translator.pushError(luaState, "not a CLR class"); } translator.pushObject(luaState, t, "luaNet_metatable"); return 1; }