Bug 3440044
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12842 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
3aafb96325
commit
959fdf2053
2 changed files with 10 additions and 3 deletions
|
|
@ -5,6 +5,11 @@ See the RELEASENOTES file for a summary of changes in each release.
|
||||||
Version 2.0.5 (in progress)
|
Version 2.0.5 (in progress)
|
||||||
===========================
|
===========================
|
||||||
|
|
||||||
|
2011-11-22: szager
|
||||||
|
[python] Bug 3440044: #ifdef out SWIG_Python_NonDynamicSetAttr if -builtin
|
||||||
|
isn't being used, to avoid unnecessary binary incompatibilities between
|
||||||
|
python installations.
|
||||||
|
|
||||||
2011-11-17: wsfulton
|
2011-11-17: wsfulton
|
||||||
Bug fix: Remove root directory from directory search list in Windows.
|
Bug fix: Remove root directory from directory search list in Windows.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1721,6 +1721,7 @@ SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int SWIGUNUSEDPARM(arg
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef SWIGPYTHON_BUILTIN
|
||||||
SWIGRUNTIME int
|
SWIGRUNTIME int
|
||||||
SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) {
|
SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) {
|
||||||
PyTypeObject *tp = obj->ob_type;
|
PyTypeObject *tp = obj->ob_type;
|
||||||
|
|
@ -1729,15 +1730,15 @@ SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) {
|
||||||
descrsetfunc f;
|
descrsetfunc f;
|
||||||
int res;
|
int res;
|
||||||
|
|
||||||
#ifdef Py_USING_UNICODE
|
# ifdef Py_USING_UNICODE
|
||||||
if (PyString_Check(name)) {
|
if (PyString_Check(name)) {
|
||||||
name = PyUnicode_Decode(PyString_AsString(name), PyString_Size(name), NULL, NULL);
|
name = PyUnicode_Decode(PyString_AsString(name), PyString_Size(name), NULL, NULL);
|
||||||
if (!name)
|
if (!name)
|
||||||
return -1;
|
return -1;
|
||||||
} else if (!PyUnicode_Check(name))
|
} else if (!PyUnicode_Check(name))
|
||||||
#else
|
# else
|
||||||
if (!PyString_Check(name))
|
if (!PyString_Check(name))
|
||||||
#endif
|
# endif
|
||||||
{
|
{
|
||||||
PyErr_Format(PyExc_TypeError, "attribute name must be string, not '%.200s'", name->ob_type->tp_name);
|
PyErr_Format(PyExc_TypeError, "attribute name must be string, not '%.200s'", name->ob_type->tp_name);
|
||||||
return -1;
|
return -1;
|
||||||
|
|
@ -1772,6 +1773,7 @@ SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) {
|
||||||
Py_DECREF(name);
|
Py_DECREF(name);
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue