mirror of
https://github.com/ThePhD/sol2.git
synced 2024-03-22 13:10:44 +08:00
[ci skip] Some things always go under the radar...
This commit is contained in:
parent
d617e95408
commit
94f661bf3c
|
@ -175,7 +175,7 @@ tables
|
|||
);
|
||||
|
||||
sol::table abc = lua["abc"];
|
||||
sol::state def = lua["def"];
|
||||
sol::table def = lua["def"];
|
||||
sol::table ghi = lua["def"]["ghi"];
|
||||
|
||||
int bark1 = def["ghi"]["bark"];
|
||||
|
@ -209,6 +209,8 @@ Make some:
|
|||
|
||||
.. code-block:: cpp
|
||||
|
||||
sol::state lua;
|
||||
|
||||
lua["abc"] = lua.create_table_with(
|
||||
0, 24
|
||||
);
|
||||
|
@ -320,7 +322,7 @@ The lua code to call these things is:
|
|||
|
||||
-- need class instance if you don't bind it with the function
|
||||
print(m1(sc)) -- 24.5
|
||||
-- does not need class instance: was made with one
|
||||
-- does not need class instance: was bound to lua with one
|
||||
print(m2()) -- 24.5
|
||||
|
||||
-- need class instance if you
|
||||
|
|
Loading…
Reference in New Issue
Block a user