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
8be99465
Commit
8be99465
authored
May 02, 2010
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
code simplification
parent
81161bc8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
8 deletions
+1
-8
Cython/Compiler/ExprNodes.py
Cython/Compiler/ExprNodes.py
+1
-8
No files found.
Cython/Compiler/ExprNodes.py
View file @
8be99465
...
...
@@ -6252,17 +6252,10 @@ class CoerceIntToBytesNode(CoerceToPyTypeNode):
'"value too large to pack into a byte"); %s'
%
(
code
.
error_goto
(
self
.
pos
)))
code
.
putln
(
'}'
)
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'
%
(
code
.
putln
(
'%s = PyBytes_FromStringAndSize((const char*)&%s, 1); %s'
%
(
self
.
result
(),
arg_result
,
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
())
...
...
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