fixes for the except/callback attributes to follow new flag feature convention
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@7604 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
c974e55455
commit
fd9db14a98
3 changed files with 14 additions and 18 deletions
|
|
@ -1057,7 +1057,7 @@ public:
|
|||
else
|
||||
Printf(methods,"\t { (char *)\"%s\", (PyCFunction) %s, METH_VARARGS | METH_KEYWORDS, ", name, function);
|
||||
|
||||
if (n && Getattr(n,"feature:callback")) {
|
||||
if (n && GetFlag(n,"feature:callback")) {
|
||||
if (have_docstring(n)) {
|
||||
String* ds = docstring(n, AUTODOC_FUNC, "", false);
|
||||
Replaceall(ds, "\n", "\\n");
|
||||
|
|
@ -1954,10 +1954,6 @@ public:
|
|||
have_constructor = 0;
|
||||
have_repr = 0;
|
||||
|
||||
if (GetFlag(n,"feature:exceptionclass")) {
|
||||
classic = 1;
|
||||
modern = 0;
|
||||
}
|
||||
if (GetFlag(n,"feature:classic")) {
|
||||
classic = 1;
|
||||
modern = 0;
|
||||
|
|
@ -1966,6 +1962,10 @@ public:
|
|||
classic = 0;
|
||||
modern = 1;
|
||||
}
|
||||
if (GetFlag(n,"feature:exceptionclass")) {
|
||||
classic = 1;
|
||||
modern = 0;
|
||||
}
|
||||
|
||||
shadow_indent = (String *) tab4;
|
||||
|
||||
|
|
@ -2147,16 +2147,12 @@ public:
|
|||
* ------------------------------------------------------------ */
|
||||
|
||||
virtual int functionHandler(Node *n) {
|
||||
String *pcb = Getattr(n,"feature:python:callback");
|
||||
if (pcb && (Strcmp(pcb,"0") == 0)) {
|
||||
Setattr(n,"feature:python:callback","");
|
||||
pcb = 0;
|
||||
}
|
||||
String *pcb = GetFlagAttr(n,"feature:python:callback");
|
||||
if (pcb) {
|
||||
if (Strcmp(pcb,"1") == 0) {
|
||||
Setattr(n,"feature:callback","%s_cb_ptr");
|
||||
SetFlagAttr(n,"feature:callback","%s_cb_ptr");
|
||||
} else {
|
||||
Setattr(n,"feature:callback",pcb);
|
||||
SetFlagAttr(n,"feature:callback",pcb);
|
||||
}
|
||||
autodoc_l dlevel = autodoc_level(Getattr(n, "feature:autodoc"));
|
||||
if (dlevel != NO_AUTODOC && dlevel > TYPES_AUTODOC) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue