2012年5月25日

Lua与C++的一些交互

摘要: Lua调用C函数用的堆栈是临时的,调用结束之后就被销毁了.C调用Lua函数时,C负责堆栈.1、C++调用Lua调用函数的通用方法: 1 int lua_general_call( lua_State* lua, const char* func, const char* fmt, ... ) 2 { 3 va_list vl; 4 int narg, nres; 5 int len; 6 7 8 len = lua_gettop( lua ); 9 10 va_start( vl, fmt ); 11 12 lua_ge... 阅读全文

posted @ 2012-05-25 23:16 郁郁思扬 阅读(3191) 评论(0) 推荐(0) 编辑

导航