You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Doc/Manual/Lua.html
+14-6Lines changed: 14 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -145,7 +145,7 @@ <H3><a name="Lua_commandline">29.2.1 Additional command line options</a></H3>
145
145
The following table list the additional commandline options available for the Lua module. They can also be seen by using:
146
146
</p>
147
147
148
-
<divclass="code"><pre>
148
+
<divclass="shell"><pre>
149
149
swig -lua -help
150
150
</pre></div>
151
151
@@ -747,7 +747,8 @@ <H3><a name="Lua_nn14">29.3.7 C++ classes</a></H3>
747
747
<p>
748
748
Class data members are accessed in the same manner as C structures. Static class members present a special problem for Lua, as Lua doesn't have support for such features. Therefore, SWIG generates wrappers that try to work around some of these issues. To illustrate, suppose you have a class like this:
749
749
</p>
750
-
<divclass="targetlang"><pre>class Spam {
750
+
<divclass="code"><pre>
751
+
class Spam {
751
752
public:
752
753
static void foo();
753
754
static int bar;
@@ -756,7 +757,7 @@ <H3><a name="Lua_nn14">29.3.7 C++ classes</a></H3>
756
757
<p>
757
758
In Lua, C++ static members can be accessed as follows:
758
759
</p>
759
-
<divclass="code"><pre>
760
+
<divclass="targetlang"><pre>
760
761
> example.Spam.foo() -- calling Spam::foo()
761
762
> a=example.Spam.bar -- reading Spam::bar
762
763
> example.Spam.bar=b -- writing to Spam::bar
@@ -774,7 +775,7 @@ <H3><a name="Lua_nn14">29.3.7 C++ classes</a></H3>
774
775
<b>Compatibility Note:</b> In versions prior to SWIG-3.0.0 only the following names would work:
775
776
</p>
776
777
777
-
<divclass="code"><pre>
778
+
<divclass="targetlang"><pre>
778
779
> example.Spam_foo() -- calling Spam::foo()
779
780
> a=example.Spam_bar -- reading Spam::bar
780
781
> example.Spam_bar=b -- writing to Spam::bar
@@ -964,7 +965,8 @@ <H3><a name="Lua_nn18">29.3.11 C++ operators</a></H3>
964
965
<p>
965
966
One restriction with operator overloading support is that SWIG is not able to fully handle operators that aren't defined as part of the class. For example, if you had code like this
@@ -973,7 +975,8 @@ <H3><a name="Lua_nn18">29.3.11 C++ operators</a></H3>
973
975
<p>
974
976
then SWIG doesn't know what to do with the friend function--in fact, it simply ignores it and issues a warning. You can still wrap the operator, but you may have to encapsulate it in a special function. For example:
<p> This behaviour was changed. Now unless -squash-bases option is provided, Derived store a list of it's bases and if some symbol is not found in it's own service tables
1518
1524
then its bases are searched for it. Option -squash-bases will effectively return old behaviour.
0 commit comments