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
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
nexedi
cython
Commits
511b14d8
Commit
511b14d8
authored
May 02, 2010
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
reverted last commit, cast must happen to the value, not its pointer
parent
8be99465
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletion
+8
-1
Cython/Compiler/ExprNodes.py
Cython/Compiler/ExprNodes.py
+8
-1
No files found.
Cython/Compiler/ExprNodes.py
View file @
511b14d8
...
@@ -6252,10 +6252,17 @@ class CoerceIntToBytesNode(CoerceToPyTypeNode):
...
@@ -6252,10 +6252,17 @@ class CoerceIntToBytesNode(CoerceToPyTypeNode):
'"value too large to pack into a byte"); %s'
%
(
'"value too large to pack into a byte"); %s'
%
(
code
.
error_goto
(
self
.
pos
)))
code
.
error_goto
(
self
.
pos
)))
code
.
putln
(
'}'
)
code
.
putln
(
'}'
)
code
.
putln
(
'%s = PyBytes_FromStringAndSize((const char*)&%s, 1); %s'
%
(
temp
=
None
if
arg
.
type
is
not
PyrexTypes
.
c_char_type
:
temp
=
code
.
funcstate
.
allocate_temp
(
PyrexTypes
.
c_char_type
,
manage_ref
=
False
)
code
.
putln
(
"%s = (char)%s;"
%
(
temp
,
arg_result
))
arg_result
=
temp
code
.
putln
(
'%s = PyBytes_FromStringAndSize(&%s, 1); %s'
%
(
self
.
result
(),
self
.
result
(),
arg_result
,
arg_result
,
code
.
error_goto_if_null
(
self
.
result
(),
self
.
pos
)))
code
.
error_goto_if_null
(
self
.
result
(),
self
.
pos
)))
if
temp
is
not
None
:
code
.
funcstate
.
release_temp
(
temp
)
code
.
put_gotref
(
self
.
py_result
())
code
.
put_gotref
(
self
.
py_result
())
...
...
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