File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -28,9 +28,9 @@ if (useStrings) then
2828-- Use vector.
2929else
3030 ec .callbackCallVector = function (key , vector )
31- printValues (" callVector" , vector .strings )
31+ printValues (" callVector" , vector .values )
3232 v = Vector .new ()
33- v :setStrings ({" Z" , " A" })
33+ v :setValues ({" Z" , " A" })
3434 return v
3535 end
3636end
Original file line number Diff line number Diff line change @@ -49,9 +49,9 @@ class EnvironmentClient
4949 else if (this ->callbackCallVector )
5050 {
5151 Vector in;
52- in.strings = values;
52+ in.values = values;
5353 Vector out = this ->callbackCallVector (key, in);
54- return out.strings ;
54+ return out.values ;
5555 }
5656 printf (
5757 " EnvironmentClient.call(%s, %s). provide callback!\n " ,
Original file line number Diff line number Diff line change @@ -10,12 +10,12 @@ struct Vector
1010{
1111 Vector () { }
1212
13- void setStrings (const Strings & strings )
13+ void setValues (const Strings & values )
1414 {
15- this -> strings = strings ;
15+ this -> values = values ;
1616 }
1717
18- Strings strings ;
18+ Strings values ;
1919};
2020
2121#endif // CPP_CALLBACK_SCRIPT_VECTOR_H
Original file line number Diff line number Diff line change @@ -86,11 +86,11 @@ void runSol(const char *fileName)
8686 // Register vector class.
8787 lua.new_usertype <Vector>(
8888 " Vector" ,
89- " strings " , &Vector::strings ,
90- " setStrings " ,
91- [](Vector &vector, sol::nested<Strings> strings )
89+ " values " , &Vector::values ,
90+ " setValues " ,
91+ [](Vector &vector, sol::nested<Strings> values )
9292 {
93- return vector.setStrings (strings );
93+ return vector.setValues (values );
9494 }
9595 );
9696
You can’t perform that action at this time.
0 commit comments