Eliminate unused Printf args
This commit is contained in:
parent
1757f548a4
commit
0bf846f56f
5 changed files with 10 additions and 9 deletions
|
|
@ -453,7 +453,7 @@ public:
|
|||
Printv(df->def, "static Scheme_Object *\n", dname, "(int argc, Scheme_Object **argv) {", NIL);
|
||||
Printv(df->code, dispatch, "\n", NIL);
|
||||
Printf(df->code, "scheme_signal_error(\"No matching function for overloaded '%s'\");\n", iname);
|
||||
Printf(df->code, "return NULL;\n", iname);
|
||||
Printf(df->code, "return NULL;\n");
|
||||
Printv(df->code, "}\n", NIL);
|
||||
Wrapper_print(df, f_wrappers);
|
||||
Printf(init_func_def, "scheme_add_global(\"%s\", scheme_make_prim_w_arity(%s,\"%s\",%d,%d),menv);\n", proc_name, dname, proc_name, 0, maxargs);
|
||||
|
|
|
|||
|
|
@ -815,7 +815,7 @@ public:
|
|||
Printf(tmp, "}");
|
||||
Wrapper_add_local(f, "argv", tmp);
|
||||
Printv(f->code, dispatch, "\n", NIL);
|
||||
Printf(f->code, "error(\"No matching function for overload\");\n", iname);
|
||||
Printf(f->code, "error(\"No matching function for overload\");\n");
|
||||
Printf(f->code, "return octave_value_list();\n");
|
||||
Printv(f->code, "}\n", NIL);
|
||||
|
||||
|
|
|
|||
|
|
@ -2341,7 +2341,7 @@ public:
|
|||
Replaceall(tm, "$error", "ERRSV");
|
||||
Printv(w->code, Str(tm), "\n", NIL);
|
||||
} else {
|
||||
Printf(w->code, " Swig::DirectorMethodException::raise(ERRSV);\n", classname, pyname);
|
||||
Printf(w->code, " Swig::DirectorMethodException::raise(ERRSV);\n");
|
||||
}
|
||||
Append(w->code, "}\n");
|
||||
Delete(tm);
|
||||
|
|
|
|||
|
|
@ -2341,7 +2341,6 @@ done:
|
|||
|
||||
virtual int constructorHandler(Node *n) {
|
||||
if (Swig_directorclass(n)) {
|
||||
String *name = GetChar(Swig_methodclass(n), "name");
|
||||
String *ctype = GetChar(Swig_methodclass(n), "classtype");
|
||||
String *sname = GetChar(Swig_methodclass(n), "sym:name");
|
||||
String *args = NewStringEmpty();
|
||||
|
|
@ -2369,7 +2368,7 @@ done:
|
|||
Printf(director_ctor_code, "if (Z_TYPE_P(arg0) == IS_NULL) { /* not subclassed */\n");
|
||||
Printf(director_prot_ctor_code, "if (Z_TYPE_P(arg0) == IS_NULL) { /* not subclassed */\n");
|
||||
Printf(director_ctor_code, " %s = (%s *)new %s(%s);\n", Swig_cresult_name(), ctype, ctype, args);
|
||||
Printf(director_prot_ctor_code, " SWIG_PHP_Error(E_ERROR, \"accessing abstract class or protected constructor\");\n", name, name, args);
|
||||
Printf(director_prot_ctor_code, " SWIG_PHP_Error(E_ERROR, \"accessing abstract class or protected constructor\");\n");
|
||||
if (i) {
|
||||
Insert(args, 0, ", ");
|
||||
}
|
||||
|
|
@ -2717,7 +2716,7 @@ done:
|
|||
// typemap_directorout testcase requires that 0 can be assigned to the
|
||||
// variable named after the result of Swig_cresult_name(), so that can't
|
||||
// be a zval - make it a pointer to one instead.
|
||||
Printf(w->code, "zval swig_zval_result, swig_funcname;\n", Swig_cresult_name());
|
||||
Printf(w->code, "zval swig_zval_result, swig_funcname;\n");
|
||||
Printf(w->code, "zval * SWIGUNUSED %s = &swig_zval_result;\n", Swig_cresult_name());
|
||||
const char * funcname = GetChar(n, "sym:name");
|
||||
Printf(w->code, "ZVAL_STRINGL(&swig_funcname, \"%s\", %d);\n", funcname, strlen(funcname));
|
||||
|
|
|
|||
|
|
@ -3613,7 +3613,7 @@ public:
|
|||
// class type (the SWIG_init() is called before shadow classes are
|
||||
// defined and registered).
|
||||
Printf(f_wrappers, "SWIGINTERN PyObject *%s_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {\n", iname);
|
||||
Printf(f_wrappers, tab2 "PyObject *module;\n", tm);
|
||||
Printf(f_wrappers, tab2 "PyObject *module;\n");
|
||||
Printf(f_wrappers, tab2 "PyObject *d;\n");
|
||||
Printf(f_wrappers, tab2 "if (!SWIG_Python_UnpackTuple(args, \"swigconstant\", 1, 1, &module)) return NULL;\n");
|
||||
Printf(f_wrappers, tab2 "d = PyModule_GetDict(module);\n");
|
||||
|
|
@ -4023,7 +4023,7 @@ public:
|
|||
if (GetFlag(mgetset, "static")) {
|
||||
Printf(f, "static PyGetSetDef %s_def = %s;\n", gspair, entry);
|
||||
Printf(f_init, "static_getset = SwigPyStaticVar_new_getset(metatype, &%s_def);\n", gspair);
|
||||
Printf(f_init, "PyDict_SetItemString(d, static_getset->d_getset->name, (PyObject *) static_getset);\n", memname);
|
||||
Printf(f_init, "PyDict_SetItemString(d, static_getset->d_getset->name, (PyObject *) static_getset);\n");
|
||||
Printf(f_init, "Py_DECREF(static_getset);\n");
|
||||
} else {
|
||||
Printf(getset_def, " %s,\n", entry);
|
||||
|
|
@ -4472,7 +4472,9 @@ public:
|
|||
Printf(f_shadow, "(Exception)");
|
||||
} else {
|
||||
Printf(f_shadow, "(object");
|
||||
Printf(f_shadow, py3 && GetFlag(n, "feature:python:nondynamic") ? ", metaclass=_SwigNonDynamicMeta" : "", ")");
|
||||
if (py3 && GetFlag(n, "feature:python:nondynamic")) {
|
||||
Printf(f_shadow, ", metaclass=_SwigNonDynamicMeta");
|
||||
}
|
||||
Printf(f_shadow, ")");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue