Escape unescape < > & in HTML
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9664 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
a317f22ab2
commit
cf6e9f2743
3 changed files with 23 additions and 23 deletions
|
|
@ -581,7 +581,7 @@ Original Datatype lstr()
|
|||
const char *a char *a
|
||||
double a[20] double *a
|
||||
double a[20][30] double *a
|
||||
double &a double *a
|
||||
double &a double *a
|
||||
</pre>
|
||||
</blockquote>
|
||||
|
||||
|
|
@ -605,7 +605,7 @@ char *a
|
|||
const char *a (const char *) name
|
||||
double a[20] (double *) name
|
||||
double a[20][30] (double (*)[30]) name
|
||||
double &a (double &) *name
|
||||
double &a (double &) *name
|
||||
</pre>
|
||||
</blockquote>
|
||||
|
||||
|
|
@ -626,7 +626,7 @@ char *a
|
|||
const char *a (char *) name
|
||||
double a[20] (double *) name
|
||||
double a[20][30] (double *) name
|
||||
double &a (double *) &name
|
||||
double &a (double *) &name
|
||||
</pre>
|
||||
</blockquote>
|
||||
|
||||
|
|
@ -807,7 +807,7 @@ The "bar" method is wrapped by a function like this:
|
|||
<blockquote>
|
||||
<pre>
|
||||
double Foo_bar(Foo *self, double arg0) {
|
||||
return self->bar(arg0);
|
||||
return self->bar(arg0);
|
||||
}
|
||||
</pre>
|
||||
</blockquote>
|
||||
|
|
@ -829,10 +829,10 @@ gets wrapped as follows:
|
|||
<blockquote>
|
||||
<pre>
|
||||
int Foo_x_get(Foo *self) {
|
||||
return self->x;
|
||||
return self->x;
|
||||
}
|
||||
int Foo_x_set(Foo *self, int value) {
|
||||
return (self->x = value);
|
||||
return (self->x = value);
|
||||
}
|
||||
</pre>
|
||||
</blockquote>
|
||||
|
|
@ -948,7 +948,7 @@ ParmList *l = ... parameter list of the function ...
|
|||
DataType *t = ... return type of the function ...
|
||||
char *name = ... name of the function ...
|
||||
Wrapper *w = NewWrapper();
|
||||
Printf(w->def,"void wrap_%s() {\n", name);
|
||||
Printf(w->def,"void wrap_%s() {\n", name);
|
||||
|
||||
/* Declare all of the local variables */
|
||||
Swig_cargs(w, l);
|
||||
|
|
@ -962,7 +962,7 @@ Swig_cresult(w,t,"result",Swig_cfunction(name,l));
|
|||
/* Convert the result into whatever */
|
||||
...
|
||||
|
||||
Printf(w->code,"}\n");
|
||||
Printf(w->code,"}\n");
|
||||
Wrapper_print(w,out);
|
||||
</pre>
|
||||
</blockquote>
|
||||
|
|
@ -1073,25 +1073,25 @@ With each is the cast that can be used in the debugger to extract the underlying
|
|||
<p>
|
||||
<li>String *s;</li>
|
||||
<br>
|
||||
(String *)((DohBase *)s)->data
|
||||
(String *)((DohBase *)s)->data
|
||||
<br>
|
||||
The underlying char * string can be displayed with
|
||||
<br>
|
||||
((String *)((DohBase *)s)->data)->str
|
||||
((String *)((DohBase *)s)->data)->str
|
||||
|
||||
<p>
|
||||
<li>SwigType *t;</li>
|
||||
<br>
|
||||
(String *)((DohBase *)t)->data
|
||||
(String *)((DohBase *)t)->data
|
||||
<br>
|
||||
The underlying char * string can be displayed with
|
||||
<br>
|
||||
((String *)((DohBase *)t)->data)->str
|
||||
((String *)((DohBase *)t)->data)->str
|
||||
|
||||
<p>
|
||||
<li>String_or_char *sc;</li>
|
||||
Either <br>
|
||||
((String *)((DohBase *)sc)->data)->str
|
||||
((String *)((DohBase *)sc)->data)->str
|
||||
<br> or <br>
|
||||
(char *)sc
|
||||
<br> will work depending on whether the underlying type is really a String * or char *.
|
||||
|
|
|
|||
|
|
@ -114,7 +114,7 @@ skipped text can be obtained using <tt>Scanner_text()</tt> afterwards. Returns 0
|
|||
<p>
|
||||
<b><tt>void Scanner_set_location(Scanner *s, int startchar, int endchar)</tt></b>
|
||||
<blockquote>
|
||||
Changes the current filename and line number of the scanner.<
|
||||
Changes the current filename and line number of the scanner.
|
||||
</blockquote>
|
||||
|
||||
<p>
|
||||
|
|
@ -201,9 +201,9 @@ SWIG_TOKEN_OR |
|
|||
SWIG_TOKEN_LOR ||
|
||||
SWIG_TOKEN_XOR ^
|
||||
SWIG_TOKEN_LESSTHAN <
|
||||
SWIG_TOKEN_GREATERTHAN >
|
||||
SWIG_TOKEN_GREATERTHAN >
|
||||
SWIG_TOKEN_LTEQUAL <=
|
||||
SWIG_TOKEN_GTEQUAL >=
|
||||
SWIG_TOKEN_GTEQUAL >=
|
||||
SWIG_TOKEN_NOT ~
|
||||
SWIG_TOKEN_LNOT !
|
||||
SWIG_TOKEN_LBRACKET [
|
||||
|
|
@ -218,7 +218,7 @@ SWIG_TOKEN_COLON :
|
|||
SWIG_TOKEN_DCOLON ::
|
||||
SWIG_TOKEN_DCOLONSTAR ::*
|
||||
SWIG_TOKEN_LSHIFT <<
|
||||
SWIG_TOKEN_RSHIFT >>
|
||||
SWIG_TOKEN_RSHIFT >>
|
||||
SWIG_TOKEN_QUESTION ?
|
||||
SWIG_TOKEN_PLUSPLUS ++
|
||||
SWIG_TOKEN_MINUSMINUS --
|
||||
|
|
@ -230,10 +230,10 @@ SWIG_TOKEN_ANDEQUAL &=
|
|||
SWIG_TOKEN_OREQUAL |=
|
||||
SWIG_TOKEN_XOREQUAL ^=
|
||||
SWIG_TOKEN_LSEQUAL <<=
|
||||
SWIG_TOKEN_RSEQUAL >>=
|
||||
SWIG_TOKEN_RSEQUAL >>=
|
||||
SWIG_TOKEN_MODEQUAL %=
|
||||
SWIG_TOKEN_ARROW ->
|
||||
SWIG_TOKEN_ARROWSTAR ->*
|
||||
SWIG_TOKEN_ARROW ->
|
||||
SWIG_TOKEN_ARROWSTAR ->*
|
||||
SWIG_TOKEN_PERIOD .
|
||||
SWIG_TOKEN_AT @
|
||||
SWIG_TOKEN_DOLLAR $
|
||||
|
|
|
|||
|
|
@ -196,13 +196,13 @@ Here is code that generates the above function:
|
|||
<blockquote>
|
||||
<pre>
|
||||
Wrapper *w = NewWrapper();
|
||||
Printf(w->def,"void foo(int n) {");
|
||||
Printf(w->def,"void foo(int n) {");
|
||||
Wrapper_add_local(w,"n",""); /* parameter n */
|
||||
Wrapper_add_local(w,"i", "int i;"); /* local i */
|
||||
Printv(w->code,"for (i = 0; i < n; i++) {",
|
||||
Printv(w->code,"for (i = 0; i < n; i++) {",
|
||||
"printf(\"%d\n",i);",
|
||||
"}\n", NIL);
|
||||
Printf(w->code,"}\n");
|
||||
Printf(w->code,"}\n");
|
||||
|
||||
/* Emit wrapper code */
|
||||
Wrapper_print(w,outf);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue