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
Boxiang Sun
cython
Commits
644238bd
Commit
644238bd
authored
Apr 06, 2009
by
Lisandro Dalcin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
better Py -> C conversion for integral types (ticket #255)
parent
7b052e86
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
999 additions
and
147 deletions
+999
-147
Cython/Compiler/ModuleNode.py
Cython/Compiler/ModuleNode.py
+6
-0
Cython/Compiler/PyrexTypes.py
Cython/Compiler/PyrexTypes.py
+209
-147
Cython/Utils.py
Cython/Utils.py
+2
-0
tests/bugs/c_int_types_T255.pyx
tests/bugs/c_int_types_T255.pyx
+782
-0
No files found.
Cython/Compiler/ModuleNode.py
View file @
644238bd
...
@@ -565,6 +565,12 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
...
@@ -565,6 +565,12 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
env
.
use_utility_code
(
streq_utility_code
)
env
.
use_utility_code
(
streq_utility_code
)
# XXX this is a mess
for
utility_code
in
PyrexTypes
.
c_int_from_py_function
.
specialize_list
:
env
.
use_utility_code
(
utility_code
)
for
utility_code
in
PyrexTypes
.
c_long_from_py_function
.
specialize_list
:
env
.
use_utility_code
(
utility_code
)
def
generate_extern_c_macro_definition
(
self
,
code
):
def
generate_extern_c_macro_definition
(
self
,
code
):
name
=
Naming
.
extern_c_macro
name
=
Naming
.
extern_c_macro
code
.
putln
(
"#ifdef __cplusplus"
)
code
.
putln
(
"#ifdef __cplusplus"
)
...
...
Cython/Compiler/PyrexTypes.py
View file @
644238bd
This diff is collapsed.
Click to expand it.
Cython/Utils.py
View file @
644238bd
...
@@ -105,6 +105,7 @@ class UtilityCode(object):
...
@@ -105,6 +105,7 @@ class UtilityCode(object):
self
.
cleanup
=
cleanup
self
.
cleanup
=
cleanup
self
.
requires
=
requires
self
.
requires
=
requires
self
.
_cache
=
{}
self
.
_cache
=
{}
self
.
specialize_list
=
[]
def
write_init_code
(
self
,
writer
,
pos
):
def
write_init_code
(
self
,
writer
,
pos
):
if
not
self
.
init
:
if
not
self
.
init
:
...
@@ -141,4 +142,5 @@ class UtilityCode(object):
...
@@ -141,4 +142,5 @@ class UtilityCode(object):
none_or_sub
(
self
.
init
,
data
),
none_or_sub
(
self
.
init
,
data
),
none_or_sub
(
self
.
cleanup
,
data
),
none_or_sub
(
self
.
cleanup
,
data
),
requires
)
requires
)
self
.
specialize_list
.
append
(
s
)
return
s
return
s
tests/bugs/c_int_types_T255.pyx
0 → 100644
View file @
644238bd
This diff is collapsed.
Click to expand it.
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