Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Gwenaël Samain
cython
Commits
d86c54da
Commit
d86c54da
authored
Oct 25, 2014
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add missing pointer cast for coercion from "signed char*" to Python strings
parent
b02b993c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
11 deletions
+12
-11
Cython/Compiler/PyrexTypes.py
Cython/Compiler/PyrexTypes.py
+7
-6
Cython/Utility/TypeConversion.c
Cython/Utility/TypeConversion.c
+5
-5
No files found.
Cython/Compiler/PyrexTypes.py
View file @
d86c54da
...
...
@@ -2145,15 +2145,16 @@ class CPointerBaseType(CType):
self
.
is_pyunicode_ptr
=
1
if
self
.
is_string
and
not
base_type
.
is_error
:
if
base_type
.
signed
:
if
base_type
.
signed
==
2
:
self
.
to_py_function
=
"__Pyx_PyObject_FromCString"
if
self
.
is_ptr
:
self
.
from_py_function
=
"__Pyx_PyObject_AsSString"
elif
base_type
.
signed
:
self
.
to_py_function
=
"__Pyx_PyObject_FromString"
if
self
.
is_ptr
:
if
base_type
.
signed
==
2
:
self
.
from_py_function
=
"__Pyx_PyObject_AsSString"
else
:
self
.
from_py_function
=
"__Pyx_PyObject_AsString"
self
.
from_py_function
=
"__Pyx_PyObject_AsString"
else
:
self
.
to_py_function
=
"__Pyx_PyObject_From
U
String"
self
.
to_py_function
=
"__Pyx_PyObject_From
C
String"
if
self
.
is_ptr
:
self
.
from_py_function
=
"__Pyx_PyObject_AsUString"
self
.
exception_value
=
"NULL"
...
...
Cython/Utility/TypeConversion.c
View file @
d86c54da
...
...
@@ -32,11 +32,11 @@ static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*);
#define __Pyx_PyObject_AsSString(s) ((signed char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsUString(s) ((unsigned char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_From
U
String(s) __Pyx_PyObject_FromString((const char*)s)
#define __Pyx_PyBytes_From
U
String(s) __Pyx_PyBytes_FromString((const char*)s)
#define __Pyx_PyByteArray_From
U
String(s) __Pyx_PyByteArray_FromString((const char*)s)
#define __Pyx_PyStr_From
U
String(s) __Pyx_PyStr_FromString((const char*)s)
#define __Pyx_PyUnicode_From
U
String(s) __Pyx_PyUnicode_FromString((const char*)s)
#define __Pyx_PyObject_From
C
String(s) __Pyx_PyObject_FromString((const char*)s)
#define __Pyx_PyBytes_From
C
String(s) __Pyx_PyBytes_FromString((const char*)s)
#define __Pyx_PyByteArray_From
C
String(s) __Pyx_PyByteArray_FromString((const char*)s)
#define __Pyx_PyStr_From
C
String(s) __Pyx_PyStr_FromString((const char*)s)
#define __Pyx_PyUnicode_From
C
String(s) __Pyx_PyUnicode_FromString((const char*)s)
#if PY_MAJOR_VERSION < 3
static
CYTHON_INLINE
size_t
__Pyx_Py_UNICODE_strlen
(
const
Py_UNICODE
*
u
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment