This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/Lib/python/pyrun.swg b/Lib/python/pyrun.swg | |
index ab1237f62..0974f3061 100644 | |
--- a/Lib/python/pyrun.swg | |
+++ b/Lib/python/pyrun.swg | |
@@ -1295,17 +1295,13 @@ SWIG_Python_ConvertFunctionPtr(PyObject *obj, void **ptr, swig_type_info *ty) { | |
desc = ty ? SWIG_UnpackVoidPtr(desc + 10, &vptr, ty->name) : 0; | |
if (!desc) | |
return SWIG_ERROR; | |
- if (ty) { | |
- swig_cast_info *tc = SWIG_TypeCheck(desc,ty); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/Lib/python/pyinit.swg b/Lib/python/pyinit.swg | |
index 2cc582841..fe45ac941 100644 | |
--- a/Lib/python/pyinit.swg | |
+++ b/Lib/python/pyinit.swg | |
@@ -306,9 +306,9 @@ SWIG_Python_FixMethods(PyMethodDef *methods, | |
char *ndoc = (char*)malloc(ldoc + lptr + 10); | |
if (ndoc) { | |
char *buff = ndoc; | |
- strncpy(buff, methods[i].ml_doc, ldoc); | |
+ memcpy(buff, methods[i].ml_doc, ldoc); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/Source/Modules/python.cxx b/Source/Modules/python.cxx | |
index a6801fc4e..ae87c606e 100644 | |
--- a/Source/Modules/python.cxx | |
+++ b/Source/Modules/python.cxx | |
@@ -2542,7 +2542,7 @@ public: | |
if (!fastunpack) { | |
Wrapper_add_local(f, "ii", "Py_ssize_t ii"); | |
if (maxargs - (add_self ? 1 : 0) > 0) | |
- Append(f->code, "if (!PyTuple_Check(args)) SWIG_fail;\n"); | |
+ Append(f->code, "if (args && !PyTuple_Check(args)) SWIG_fail;\n"); |