Merge branch 'templates-scope-enforcement'
* templates-scope-enforcement: Test a few %template errors Add using declarations to templates into typedef table. Fix type lookup in the presence of using directives and using declarations More docs on %template Testcase fix for nameclash in php %template scope enforcement and class definition fixes Template documentation tweaks More consistent formatting of examples in documentation More consistent formatting of examples in documentation Documentation corrections to use targetlang formatting More consistent formatting of examples in documentation More consistent formatting of examples in documentation More consistent formatting of examples in documentation Namespace documentation minor corrections Improve description of template_parameters_resolve Minor code optimisation in template_parameters_resolve Fix scope lookup for template parameters containing unary scope operators Typemap change for templates
This commit is contained in:
commit
32a454cfef
51 changed files with 1924 additions and 700 deletions
|
|
@ -3935,9 +3935,9 @@ where <tt>Swig::DirectorException::raise</tt> is a helper method in the Director
|
|||
|
||||
<div class="code">
|
||||
<pre>
|
||||
static void raise(JNIEnv *jenv, jthrowable throwable) {
|
||||
throw DirectorException(jenv, throwable);
|
||||
}
|
||||
static void raise(JNIEnv *jenv, jthrowable throwable) {
|
||||
throw DirectorException(jenv, throwable);
|
||||
}
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
|
|
@ -4335,16 +4335,16 @@ struct Vector {
|
|||
|
||||
%extend Vector {
|
||||
char *toString() {
|
||||
static char tmp[1024];
|
||||
sprintf(tmp, "Vector(%g, %g, %g)", $self->x, $self->y, $self->z);
|
||||
return tmp;
|
||||
static char tmp[1024];
|
||||
sprintf(tmp, "Vector(%g, %g, %g)", $self->x, $self->y, $self->z);
|
||||
return tmp;
|
||||
}
|
||||
Vector(double x, double y, double z) {
|
||||
Vector *v = (Vector *) malloc(sizeof(Vector));
|
||||
v->x = x;
|
||||
v->y = y;
|
||||
v->z = z;
|
||||
return v;
|
||||
Vector *v = (Vector *) malloc(sizeof(Vector));
|
||||
v->x = x;
|
||||
v->y = y;
|
||||
v->z = z;
|
||||
return v;
|
||||
}
|
||||
};
|
||||
</pre>
|
||||
|
|
@ -5278,7 +5278,7 @@ void * operator new(size_t t) {
|
|||
throw bad_alloc();
|
||||
pJalloc->ref = 0;
|
||||
return static_cast<void *>(
|
||||
static_cast<char *>(static_cast<void *>(pJalloc)) + sizeof(Jalloc));
|
||||
static_cast<char *>(static_cast<void *>(pJalloc)) + sizeof(Jalloc));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -7240,7 +7240,7 @@ public class runme {
|
|||
example.print_args(animals);
|
||||
String args[] = example.get_args();
|
||||
for (int i=0; i<args.length; i++)
|
||||
System.out.println(i + ":" + args[i]);
|
||||
System.out.println(i + ":" + args[i]);
|
||||
}
|
||||
}
|
||||
</pre></div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue