亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? tolua_map.c

?? tolua++是一個對lua進行封裝調用的工具
?? C
?? 第 1 頁 / 共 2 頁
字號:
	return clone;}/* Default collect function*/TOLUA_API int tolua_default_collect (lua_State* tolua_S){ void* self = tolua_tousertype(tolua_S,1,0); free(self); return 0;}/* Do clone*/TOLUA_API int tolua_register_gc (lua_State* L, int lo){ int success = 1; void *value = *(void **)lua_touserdata(L,lo); lua_pushstring(L,"tolua_gc"); lua_rawget(L,LUA_REGISTRYINDEX);	lua_pushlightuserdata(L,value);	lua_rawget(L,-2);	if (!lua_isnil(L,-1)) /* make sure that object is not already owned */		success = 0;	else	{		lua_pushlightuserdata(L,value);		lua_getmetatable(L,lo);		lua_rawset(L,-4);	}	lua_pop(L,2);	return success;}/* Register a usertype	* It creates the correspoding metatable in the registry, for both 'type' and 'const type'.	* It maps 'const type' as being also a 'type'*/TOLUA_API void tolua_usertype (lua_State* L, char* type){ char ctype[128] = "const "; strncat(ctype,type,120);	/* create both metatables */ if (tolua_newmetatable(L,ctype) && tolua_newmetatable(L,type))	 mapsuper(L,type,ctype);             /* 'type' is also a 'const type' */}/* Begin module	* It pushes the module (or class) table on the stack*/TOLUA_API void tolua_beginmodule (lua_State* L, char* name){	if (name)	{	 lua_pushstring(L,name);		lua_rawget(L,-2);	}	else	 lua_pushvalue(L,LUA_GLOBALSINDEX);}/* End module	* It pops the module (or class) from the stack*/TOLUA_API void tolua_endmodule (lua_State* L){	lua_pop(L,1);}/* Map module	* It creates a new module*/#if 1TOLUA_API void tolua_module (lua_State* L, char* name, int hasvar){	if (name)	{		/* tolua module */		lua_pushstring(L,name);		lua_rawget(L,-2);		if (!lua_istable(L,-1))  /* check if module already exists */		{			lua_pop(L,1);		 lua_newtable(L);		 lua_pushstring(L,name);			lua_pushvalue(L,-2);		 lua_rawset(L,-4);       /* assing module into module */		}	}	else	{		/* global table */		lua_pushvalue(L,LUA_GLOBALSINDEX);	}	if (hasvar)	{		if (!tolua_ismodulemetatable(L))  /* check if it already has a module metatable */		{			/* create metatable to get/set C/C++ variable */			lua_newtable(L);			tolua_moduleevents(L);			if (lua_getmetatable(L,-2))				lua_setmetatable(L,-2);  /* set old metatable as metatable of metatable */			lua_setmetatable(L,-2);		}	}	lua_pop(L,1);               /* pop module */}#elseTOLUA_API void tolua_module (lua_State* L, char* name, int hasvar){	if (name)	{		/* tolua module */		lua_pushstring(L,name);		lua_newtable(L);	}	else	{		/* global table */		lua_pushvalue(L,LUA_GLOBALSINDEX);	}	if (hasvar)	{		/* create metatable to get/set C/C++ variable */		lua_newtable(L);		tolua_moduleevents(L);		if (lua_getmetatable(L,-2))			lua_setmetatable(L,-2);  /* set old metatable as metatable of metatable */		lua_setmetatable(L,-2);	}	if (name)		lua_rawset(L,-3);       /* assing module into module */	else		lua_pop(L,1);           /* pop global table */}#endifstatic void push_collector(lua_State* L, const char* type, lua_CFunction col) {	/* push collector function, but only if it's not NULL, or if there's no	   collector already */	if (!col) return;	luaL_getmetatable(L,type);	lua_pushstring(L,".collector");	/*	if (!col) {		lua_pushvalue(L, -1);		lua_rawget(L, -3);		if (!lua_isnil(L, -1)) {			lua_pop(L, 3);			return;		};		lua_pop(L, 1);	};	//	*/	lua_pushcfunction(L,col);	lua_rawset(L,-3);	lua_pop(L, 1);};/* Map C class	* It maps a C class, setting the appropriate inheritance and super classes.*/TOLUA_API void tolua_cclass (lua_State* L, char* lname, char* name, char* base, lua_CFunction col){	char cname[128] = "const ";	char cbase[128] = "const ";	strncat(cname,name,120);	strncat(cbase,base,120);	mapinheritance(L,name,base);	mapinheritance(L,cname,name);	mapsuper(L,cname,cbase);	mapsuper(L,name,base);	lua_pushstring(L,lname);		push_collector(L, name, col);	/*	luaL_getmetatable(L,name);	lua_pushstring(L,".collector");	lua_pushcfunction(L,col);	lua_rawset(L,-3);	*/		luaL_getmetatable(L,name);	lua_rawset(L,-3);              /* assign class metatable to module */	/* now we also need to store the collector table for the const	   instances of the class */	push_collector(L, cname, col);	/*	luaL_getmetatable(L,cname);	lua_pushstring(L,".collector");	lua_pushcfunction(L,col);	lua_rawset(L,-3);	lua_pop(L,1);	*/	}/* Add base	* It adds additional base classes to a class (for multiple inheritance)	* (not for now)TOLUA_API void tolua_addbase(lua_State* L, char* name, char* base) {	char cname[128] = "const ";	char cbase[128] = "const ";	strncat(cname,name,120);	strncat(cbase,base,120);	mapsuper(L,cname,cbase);	mapsuper(L,name,base);};*//* Map function	* It assigns a function into the current module (or class)*/TOLUA_API void tolua_function (lua_State* L, char* name, lua_CFunction func){ lua_pushstring(L,name); lua_pushcfunction(L,func);	lua_rawset(L,-3);}/* sets the __call event for the class (expects the class' main table on top) *//*	never really worked :(TOLUA_API void tolua_set_call_event(lua_State* L, lua_CFunction func, char* type) {	lua_getmetatable(L, -1);	//luaL_getmetatable(L, type);	lua_pushstring(L,"__call");	lua_pushcfunction(L,func);	lua_rawset(L,-3);	lua_pop(L, 1);};*//* Map constant number	* It assigns a constant number into the current module (or class)*/TOLUA_API void tolua_constant (lua_State* L, char* name, double value){	lua_pushstring(L,name);	tolua_pushnumber(L,value);	lua_rawset(L,-3);}/* Map variable	* It assigns a variable into the current module (or class)*/TOLUA_API void tolua_variable (lua_State* L, char* name, lua_CFunction get, lua_CFunction set){	/* get func */	lua_pushstring(L,".get");	lua_rawget(L,-2);	if (!lua_istable(L,-1))	{		/* create .get table, leaving it at the top */		lua_pop(L,1);		lua_newtable(L);	 lua_pushstring(L,".get");		lua_pushvalue(L,-2);		lua_rawset(L,-4);	}	lua_pushstring(L,name);	lua_pushcfunction(L,get); lua_rawset(L,-3);                  /* store variable */	lua_pop(L,1);                      /* pop .get table */	/* set func */	if (set)	{		lua_pushstring(L,".set");		lua_rawget(L,-2);		if (!lua_istable(L,-1))		{			/* create .set table, leaving it at the top */			lua_pop(L,1);			lua_newtable(L);			lua_pushstring(L,".set");			lua_pushvalue(L,-2);			lua_rawset(L,-4);		}		lua_pushstring(L,name);		lua_pushcfunction(L,set);		lua_rawset(L,-3);                  /* store variable */		lua_pop(L,1);                      /* pop .set table */	}}/* Access const array	* It reports an error when trying to write into a const array*/static int const_array (lua_State* L){ luaL_error(L,"value of const array cannot be changed"); return 0;}/* Map an array	* It assigns an array into the current module (or class)*/TOLUA_API void tolua_array (lua_State* L, char* name, lua_CFunction get, lua_CFunction set){	lua_pushstring(L,".get");	lua_rawget(L,-2);	if (!lua_istable(L,-1))	{		/* create .get table, leaving it at the top */		lua_pop(L,1);		lua_newtable(L);	 lua_pushstring(L,".get");		lua_pushvalue(L,-2);		lua_rawset(L,-4);	}	lua_pushstring(L,name); lua_newtable(L);           /* create array metatable */ lua_pushvalue(L,-1);	lua_setmetatable(L,-2);    /* set the own table as metatable (for modules) */ lua_pushstring(L,"__index"); lua_pushcfunction(L,get);	lua_rawset(L,-3); lua_pushstring(L,"__newindex"); lua_pushcfunction(L,set?set:const_array);	lua_rawset(L,-3); lua_rawset(L,-3);                  /* store variable */	lua_pop(L,1);                      /* pop .get table */}TOLUA_API void tolua_dobuffer(lua_State* L, char* B, unsigned int size, const char* name) { #ifdef LUA_VERSION_NUM /* lua 5.1 */ luaL_loadbuffer(L, B, size, name) || lua_pcall(L, 0, 0, 0); #else lua_dobuffer(L, B, size, name); #endif};

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美日本免费一区二区三区| 亚洲欧美日韩一区二区三区在线观看| 久久久亚洲精品石原莉奈| 亚洲欧洲精品成人久久奇米网| 日本欧美加勒比视频| 99久久精品国产麻豆演员表| 精品国产成人系列| 午夜国产精品一区| 91麻豆国产福利在线观看| 精品国产sm最大网站| 日韩av电影免费观看高清完整版 | 日韩欧美你懂的| 亚洲精品久久久久久国产精华液| 国产精品一色哟哟哟| 日韩欧美一二三区| 青青草精品视频| 欧美日韩一区二区三区高清| 综合色中文字幕| 国产91丝袜在线播放| 精品国产乱码久久久久久夜甘婷婷 | 欧美日韩大陆一区二区| 中文字幕一区视频| 色婷婷综合久久久中文一区二区 | 欧美日韩在线免费视频| 中文字幕亚洲区| 成人午夜视频免费看| 国产偷国产偷亚洲高清人白洁 | 亚洲精选一二三| 成人午夜电影久久影院| 久久伊99综合婷婷久久伊| 全国精品久久少妇| 欧美一级一区二区| 日本午夜精品视频在线观看 | av亚洲精华国产精华| 国产色一区二区| 国产成人高清在线| 国产精品久久久久久久午夜片| 国产又粗又猛又爽又黄91精品| 亚洲精品一区二区三区四区高清| 麻豆精品一二三| 精品久久久久久久人人人人传媒| 久久99国产精品麻豆| 久久久天堂av| 91在线一区二区| 一区二区三区四区高清精品免费观看| 91麻豆swag| 日韩极品在线观看| 精品日产卡一卡二卡麻豆| 国产成人在线影院| 中文字幕亚洲区| 欧美日韩黄色一区二区| 日日噜噜夜夜狠狠视频欧美人| 日韩精品一区二区三区三区免费| 国产乱人伦偷精品视频不卡 | 久久免费午夜影院| 成人午夜在线播放| 亚洲综合视频在线| 欧美一区二区福利视频| 国产精品影视在线观看| 亚洲人xxxx| 日韩午夜电影av| 成人精品小蝌蚪| 亚洲va欧美va天堂v国产综合| 欧美岛国在线观看| 成人av网站在线观看| 午夜视频在线观看一区二区三区| 日韩色在线观看| 色综合网色综合| 久久99精品国产91久久来源| 亚洲色图欧洲色图婷婷| 91精品久久久久久蜜臀| 99热在这里有精品免费| 日韩电影一二三区| 亚洲视频 欧洲视频| 日韩欧美国产一区二区三区| 91免费在线播放| 麻豆久久久久久| 亚洲午夜在线电影| 国产午夜一区二区三区| 欧美久久一二区| 成人av网站大全| 久久99国产精品尤物| 亚洲高清不卡在线观看| 国产精品美女一区二区三区| 91精品在线一区二区| 99久久亚洲一区二区三区青草 | 亚洲与欧洲av电影| 国产日产精品一区| 日韩欧美在线网站| 欧美日韩在线一区二区| 99riav久久精品riav| 国产福利精品一区| 久久国产三级精品| 日韩激情视频在线观看| 国产一区二区导航在线播放| 一级特黄大欧美久久久| 亚洲国产高清在线| 久久久久久久久久久99999| 91精品国产色综合久久久蜜香臀| 在线视频一区二区三区| 91香蕉国产在线观看软件| 国产成人精品一区二区三区网站观看| 蜜臀久久99精品久久久久宅男| 夜夜精品视频一区二区| 亚洲精品五月天| 亚洲欧美日韩一区| 亚洲同性同志一二三专区| 中文字幕乱码一区二区免费| 久久久精品中文字幕麻豆发布| 欧美一区二区三区视频| 91精品麻豆日日躁夜夜躁| 69久久99精品久久久久婷婷 | 91浏览器在线视频| 91蜜桃免费观看视频| 色综合久久久久| 99精品黄色片免费大全| 91一区在线观看| 色综合 综合色| 欧美日韩一区二区三区在线看| 欧美艳星brazzers| 欧美日韩不卡一区| 欧美一区二区三区喷汁尤物| 欧美一区二区三区男人的天堂| 欧美一级黄色录像| 日韩欧美一区二区免费| 精品人在线二区三区| 久久久电影一区二区三区| 国产日韩欧美a| 亚洲欧美综合另类在线卡通| 亚洲精品视频在线观看网站| 亚洲成人资源网| 久久精品国产**网站演员| 国产专区综合网| 91在线精品一区二区三区| 在线观看中文字幕不卡| 制服丝袜日韩国产| 久久久久久久久久久黄色| 国产精品久久久久久久久久免费看| 亚洲色图视频网| 天天色天天操综合| 国产一区在线观看麻豆| 成人短视频下载| 欧美人妖巨大在线| 欧美不卡一区二区三区四区| 国产欧美日韩卡一| 亚洲免费伊人电影| 日本三级亚洲精品| eeuss鲁片一区二区三区 | 亚洲va国产天堂va久久en| 激情成人午夜视频| 91蝌蚪porny九色| 欧美大尺度电影在线| 亚洲日本一区二区| 另类的小说在线视频另类成人小视频在线| 国产成人在线观看免费网站| 日本韩国欧美一区| 久久久午夜精品理论片中文字幕| 一二三区精品福利视频| 国产乱色国产精品免费视频| 欧美性受极品xxxx喷水| 国产日韩av一区| 美女一区二区三区在线观看| 99天天综合性| 久久蜜桃一区二区| 午夜欧美大尺度福利影院在线看| 成人小视频免费观看| 日韩欧美高清在线| 亚洲一二三四区不卡| 成人小视频免费在线观看| 日韩一级在线观看| 一区二区三区四区不卡视频| 国产真实乱对白精彩久久| 欧美伊人久久久久久久久影院 | 欧美电影免费提供在线观看| 一区二区免费看| 成人91在线观看| 日本一区二区综合亚洲| 日韩1区2区日韩1区2区| 欧美亚洲免费在线一区| 中文字幕亚洲不卡| 国产高清一区日本| 久久影视一区二区| 久久精品999| 91精品国产综合久久精品麻豆| 亚洲精品日韩一| 色偷偷久久人人79超碰人人澡 | 色综合色综合色综合| 欧美高清在线精品一区| 久久精品二区亚洲w码| 91精品国产综合久久精品app| 亚洲国产欧美另类丝袜| 91丝袜美腿高跟国产极品老师| 中文字幕av一区二区三区高| 国精品**一区二区三区在线蜜桃| 日韩视频免费观看高清在线视频| 亚洲成a人片在线不卡一二三区| 欧美一a一片一级一片| 午夜精品一区二区三区三上悠亚| 欧美在线色视频| 亚洲国产sm捆绑调教视频|