Fix some typos in docs and examples and make the code look nicer.

This commit is contained in:
sunoru 2016-12-31 23:06:56 +08:00
commit 8985c34809
45 changed files with 717 additions and 717 deletions

View file

@ -602,7 +602,7 @@ For the <tt>%array_functions</tt> example, the equivalent usage would be:
<pre>
SWIGTYPE_p_double a = example.new_doubleArray(10); // Create an array
for (int i=0; i&lt;10; i++)
example.doubleArray_setitem(a,i,2*i); // Set a value
example.doubleArray_setitem(a, i, 2*i); // Set a value
example.print_array(a); // Pass to C
example.delete_doubleArray(a); // Destroy array
</pre>
@ -1684,7 +1684,7 @@ void SwigDirector_Base::BaseBoolMethod(Base const &amp;b, bool flag) {
unsigned int jflag ;
if (!swig_callbackBaseBoolMethod) {
Base::BaseBoolMethod(b,flag);
Base::BaseBoolMethod(b, flag);
return;
} else {
jb = (Base *) &amp;b;
@ -2160,7 +2160,7 @@ The typemaps to achieve this are shown below.
%typemap(cstype) CDate &amp; "out System.DateTime"
%typemap(csin,
pre=" CDate temp$csinput = new CDate();",
post=" $csinput = new System.DateTime(temp$csinput.getYear(),"
post=" $csinput = new System.DateTime(temp$csinput.getYear(), "
" temp$csinput.getMonth(), temp$csinput.getDay(), 0, 0, 0);",
cshin="out $csinput"
) CDate &amp;
@ -2266,7 +2266,7 @@ will be possible with the following <tt>CDate *</tt> typemaps
%typemap(csin,
pre=" CDate temp$csinput = new CDate($csinput.Year, $csinput.Month, $csinput.Day);",
post=" $csinput = new System.DateTime(temp$csinput.getYear(),"
post=" $csinput = new System.DateTime(temp$csinput.getYear(), "
" temp$csinput.getMonth(), temp$csinput.getDay(), 0, 0, 0);",
cshin="ref $csinput"
) CDate *
@ -2305,7 +2305,7 @@ The <tt>subtractYears</tt> method is nearly identical to the above <tt>addYears<
<pre>
%typemap(csin,
pre=" using (CDate temp$csinput = new CDate($csinput.Year, $csinput.Month, $csinput.Day)) {",
post=" $csinput = new System.DateTime(temp$csinput.getYear(),"
post=" $csinput = new System.DateTime(temp$csinput.getYear(), "
" temp$csinput.getMonth(), temp$csinput.getDay(), 0, 0, 0);",
terminator=" } // terminate temp$csinput using block",
cshin="ref $csinput"
@ -2377,7 +2377,7 @@ The typemap type required is thus <tt>CDate *</tt>. Given that the previous sect
%typemap(csin,
pre=" CDate temp$csinput = new CDate($csinput.Year, $csinput.Month, $csinput.Day);",
post=" $csinput = new System.DateTime(temp$csinput.getYear(),"
post=" $csinput = new System.DateTime(temp$csinput.getYear(), "
" temp$csinput.getMonth(), temp$csinput.getDay(), 0, 0, 0);",
cshin="ref $csinput"
) CDate *