mirror of
https://github.com/ThePhD/sol2.git
synced 2024-03-22 13:10:44 +08:00
fix cpp_object usertype error
fix usertype_call_from_c++.cpp cpp_object usertype error
This commit is contained in:
parent
19898d8d3e
commit
22c4dc6296
@ -24,7 +24,7 @@ int main(int, char*[]) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
lua.new_usertype<cpp_object>(
|
lua.new_usertype<cpp_object>(
|
||||||
"test", "value", &cpp_object::value);
|
"cpp_object", "value", &cpp_object::value);
|
||||||
lua.new_usertype<test>("test", "func", &test::func);
|
lua.new_usertype<test>("test", "func", &test::func);
|
||||||
lua.script(
|
lua.script(
|
||||||
"function test:lua_func(obj) print('lua_func', "
|
"function test:lua_func(obj) print('lua_func', "
|
||||||
|
Loading…
x
Reference in New Issue
Block a user