Add support function for displaying the declaration of a methods. Add special variables for use in \%exception:
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10255 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
2cb828dbf8
commit
61cc1dd334
4 changed files with 109 additions and 6 deletions
|
|
@ -342,10 +342,26 @@ int emit_action_code(Node *n, Wrapper *f, String *eaction) {
|
|||
if (tm)
|
||||
tm = Copy(tm);
|
||||
if ((tm) && Len(tm) && (Strcmp(tm, "1") != 0)) {
|
||||
Replaceall(tm, "$name", Getattr(n, "name"));
|
||||
Replaceall(tm, "$symname", Getattr(n, "sym:name"));
|
||||
Replaceall(tm, "$function", eaction);
|
||||
Replaceall(tm, "$action", eaction);
|
||||
if (Strstr(tm, "$")) {
|
||||
Replaceall(tm, "$name", Getattr(n, "name"));
|
||||
Replaceall(tm, "$symname", Getattr(n, "sym:name"));
|
||||
Replaceall(tm, "$function", eaction); // deprecated
|
||||
Replaceall(tm, "$action", eaction);
|
||||
Replaceall(tm, "$wrapname", Getattr(n, "wrap:name"));
|
||||
String *overloaded = Getattr(n, "sym:overloaded");
|
||||
Replaceall(tm, "$overname", overloaded ? Char(Getattr(n, "sym:overname")) : "");
|
||||
|
||||
if (Strstr(tm, "$decl")) {
|
||||
String *decl = Swig_name_decl(n);
|
||||
Replaceall(tm, "$decl", decl);
|
||||
Delete(decl);
|
||||
}
|
||||
if (Strstr(tm, "$fulldecl")) {
|
||||
String *fulldecl = Swig_name_fulldecl(n);
|
||||
Replaceall(tm, "$fulldecl", fulldecl);
|
||||
Delete(fulldecl);
|
||||
}
|
||||
}
|
||||
Printv(f->code, tm, "\n", NIL);
|
||||
Delete(tm);
|
||||
return 1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue