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
2a912f00
Commit
2a912f00
authored
Mar 13, 2009
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
support interdependencies between utility code fragments
parent
df9b6431
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
1 deletion
+5
-1
Cython/Compiler/Code.py
Cython/Compiler/Code.py
+3
-0
Cython/Utils.py
Cython/Utils.py
+2
-1
No files found.
Cython/Compiler/Code.py
View file @
2a912f00
...
...
@@ -419,6 +419,9 @@ class GlobalState(object):
"""
if
name
is
None
:
name
=
id
(
utility_code
)
if
self
.
check_utility_code_needed_and_register
(
name
):
if
utility_code
.
requires
:
for
dependency
in
utility_code
.
requires
:
self
.
use_utility_code
(
dependency
)
if
utility_code
.
proto
:
self
.
utilprotowriter
.
put
(
utility_code
.
proto
)
if
utility_code
.
impl
:
...
...
Cython/Utils.py
View file @
2a912f00
...
...
@@ -92,11 +92,12 @@ def long_literal(value):
# a simple class that simplifies the usage of utility code
class
UtilityCode
(
object
):
def
__init__
(
self
,
proto
=
None
,
impl
=
None
,
init
=
None
,
cleanup
=
None
):
def
__init__
(
self
,
proto
=
None
,
impl
=
None
,
init
=
None
,
cleanup
=
None
,
requires
=
None
):
self
.
proto
=
proto
self
.
impl
=
impl
self
.
init
=
init
self
.
cleanup
=
cleanup
self
.
requires
=
requires
def
write_init_code
(
self
,
writer
,
pos
):
if
not
self
.
init
:
...
...
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