correct return type for PyUnicode_GetSize
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11041 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
a1fdbfd282
commit
e2679a6fd3
2 changed files with 2 additions and 2 deletions
|
|
@ -17,7 +17,7 @@ SWIG_AsWCharPtrAndSize(PyObject *obj, wchar_t **cptr, size_t *psize, int *alloc)
|
||||||
}
|
}
|
||||||
%#endif
|
%#endif
|
||||||
if (isunicode) {
|
if (isunicode) {
|
||||||
int len = PyUnicode_GetSize(obj);
|
Py_ssize_t len = PyUnicode_GetSize(obj);
|
||||||
if (cptr) {
|
if (cptr) {
|
||||||
*cptr = %new_array(len + 1, wchar_t);
|
*cptr = %new_array(len + 1, wchar_t);
|
||||||
PyUnicode_AsWideChar((PyUnicodeObject *)obj, *cptr, len);
|
PyUnicode_AsWideChar((PyUnicodeObject *)obj, *cptr, len);
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,7 @@ SWIG_AsWCharPtrAndSize(VALUE obj, wchar_t **cptr, size_t *psize, int *alloc)
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
// if (ok) {
|
// if (ok) {
|
||||||
// int len = PyUnicode_GetSize(obj);
|
// Py_ssize_t len = PyUnicode_GetSize(obj);
|
||||||
// rb_notimplement();
|
// rb_notimplement();
|
||||||
// if (cptr) {
|
// if (cptr) {
|
||||||
// *cptr = %new_array(len + 1, wchar_t);
|
// *cptr = %new_array(len + 1, wchar_t);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue