请问 LuaBridge 怎么绑定带有 wstring/wchar_t* 类型参数的函数
lua吧
全部回复
仅看楼主
level 1
函数声明:
wstring Get(const wchar_t* lpAppName, const wchar_t* lpKeyName, const wchar_t* def = L"");
或者全部使用wstring:
wstring Get(wstring lpAppName, wstring lpKeyName, wstring def = L"");
绑定代码:
.addFunction("Get", &Config::Get)
2016年03月29日 04点03分 1
level 11
没用过luabridge 帮不了你
2016年03月29日 05点03分 2
嗯嗯,好吧,我打算自己实现个ustring 类了,统一到 utf-8 编码
2016年03月29日 06点03分
level 1
我怀疑可以在Lua脚本里直接用wstring("我是utf8")来创建一个wstring类型的字符串,明天测试一下。
2016年03月29日 18点03分 3
1