Fix syntax errors for %callback examples
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9883 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
08f3b56f9b
commit
258e9d7a18
2 changed files with 8 additions and 8 deletions
8
CHANGES
8
CHANGES
|
|
@ -14771,10 +14771,10 @@ Version 1.3.7 (September 3, 2001)
|
|||
This creates a constant 'foo' of type int (*)(int,int).
|
||||
Alternatively, you can do this:
|
||||
|
||||
%callback("%s")
|
||||
%callback("%s");
|
||||
int foo(int,int);
|
||||
int bar(int,int);
|
||||
%nocallback
|
||||
%nocallback;
|
||||
|
||||
In this case, the functions are installed as constants where
|
||||
the name is defined by the format string given to %callback().
|
||||
|
|
@ -14782,10 +14782,10 @@ Version 1.3.7 (September 3, 2001)
|
|||
actual function name, both a function wrapper and a callback
|
||||
constant are created. For example:
|
||||
|
||||
%callback("%(upper)s")
|
||||
%callback("%(upper)s");
|
||||
int foo(int,int);
|
||||
int bar(int,int);
|
||||
%nocallback
|
||||
%nocallback;
|
||||
|
||||
Creates two wrapper functions 'foo', 'bar' and additionally
|
||||
creates two callback constants 'FOO', 'BAR'.
|
||||
|
|
|
|||
|
|
@ -1856,11 +1856,11 @@ can use the <tt>%callback</tt> and <tt>%nocallback</tt> directives like this:
|
|||
int binary_op(int a, int b, int (*op)(int,int));
|
||||
|
||||
/* Some callback functions */
|
||||
%callback("%s_cb")
|
||||
%callback("%s_cb");
|
||||
int add(int,int);
|
||||
int sub(int,int);
|
||||
int mul(int,int);
|
||||
%nocallback
|
||||
%nocallback;
|
||||
</pre></div>
|
||||
|
||||
<p>
|
||||
|
|
@ -1898,11 +1898,11 @@ variation installs the callbacks as all upper-case constants such as
|
|||
|
||||
<div class="code"><pre>
|
||||
/* Some callback functions */
|
||||
%callback("%(upper)s")
|
||||
%callback("%(upper)s");
|
||||
int add(int,int);
|
||||
int sub(int,int);
|
||||
int mul(int,int);
|
||||
%nocallback
|
||||
%nocallback;
|
||||
</pre></div>
|
||||
|
||||
<p>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue