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
8398c743
Commit
8398c743
authored
May 12, 2009
by
Dag Sverre Seljebotn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes for previous commit
parent
4072b4dd
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
8 deletions
+9
-8
Cython/Compiler/Buffer.py
Cython/Compiler/Buffer.py
+1
-1
Cython/Compiler/Code.py
Cython/Compiler/Code.py
+6
-6
Cython/Compiler/ModuleNode.py
Cython/Compiler/ModuleNode.py
+2
-1
No files found.
Cython/Compiler/Buffer.py
View file @
8398c743
...
@@ -618,7 +618,7 @@ def get_type_information_cname(code, dtype, maxdepth=None):
...
@@ -618,7 +618,7 @@ def get_type_information_cname(code, dtype, maxdepth=None):
# Must pre-call all used types in order not to recurse utility code
# Must pre-call all used types in order not to recurse utility code
# writing.
# writing.
assert
len
(
fields
)
>
0
assert
len
(
fields
)
>
0
types
=
[
get_type_information_cname
(
proto
,
f
.
type
,
maxdepth
-
1
)
types
=
[
get_type_information_cname
(
code
,
f
.
type
,
maxdepth
-
1
)
for
f
in
fields
]
for
f
in
fields
]
typecode
.
putln
(
"static __Pyx_StructField %s[] = {"
%
structinfo_name
,
safe
=
True
)
typecode
.
putln
(
"static __Pyx_StructField %s[] = {"
%
structinfo_name
,
safe
=
True
)
for
f
,
typeinfo
in
zip
(
fields
,
types
):
for
f
,
typeinfo
in
zip
(
fields
,
types
):
...
...
Cython/Compiler/Code.py
View file @
8398c743
...
@@ -253,13 +253,13 @@ class GlobalState(object):
...
@@ -253,13 +253,13 @@ class GlobalState(object):
assert
writer
.
globalstate
is
None
assert
writer
.
globalstate
is
None
writer
.
globalstate
=
self
writer
.
globalstate
=
self
for
part
in
self
.
code_layout
:
self
.
rootwriter
=
writer
self
.
parts
[
part
]
=
writer
.
insertion_point
()
#new_writer()
self
.
init_writers
(
writer
)
def
initialize_main_c_code
(
self
):
rootwriter
=
self
.
rootwriter
for
part
in
self
.
code_layout
:
self
.
parts
[
part
]
=
rootwriter
.
insertion_point
()
def
init_writers
(
self
,
rootwriter
):
self
.
decls_writer
=
rootwriter
.
new_writer
()
self
.
decls_writer
=
rootwriter
.
new_writer
()
self
.
pystring_table
=
rootwriter
.
new_writer
()
self
.
pystring_table
=
rootwriter
.
new_writer
()
self
.
init_cached_builtins_writer
=
rootwriter
.
new_writer
()
self
.
init_cached_builtins_writer
=
rootwriter
.
new_writer
()
...
@@ -297,7 +297,7 @@ class GlobalState(object):
...
@@ -297,7 +297,7 @@ class GlobalState(object):
(
Naming
.
filetable_cname
,
Naming
.
filenames_cname
))
(
Naming
.
filetable_cname
,
Naming
.
filenames_cname
))
code
.
putln
(
"}"
)
code
.
putln
(
"}"
)
def
finalize_
writers
(
self
):
def
finalize_
main_c_code
(
self
):
self
.
close_global_decls
()
self
.
close_global_decls
()
#
#
...
...
Cython/Compiler/ModuleNode.py
View file @
8398c743
...
@@ -253,6 +253,7 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
...
@@ -253,6 +253,7 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
emit_linenums
=
options
.
emit_linenums
emit_linenums
=
options
.
emit_linenums
rootwriter
=
Code
.
CCodeWriter
(
emit_linenums
=
emit_linenums
)
rootwriter
=
Code
.
CCodeWriter
(
emit_linenums
=
emit_linenums
)
globalstate
=
Code
.
GlobalState
(
rootwriter
,
emit_linenums
)
globalstate
=
Code
.
GlobalState
(
rootwriter
,
emit_linenums
)
globalstate
.
initialize_main_c_code
()
h_code
=
globalstate
[
'h_code'
]
h_code
=
globalstate
[
'h_code'
]
self
.
generate_module_preamble
(
env
,
modules
,
h_code
)
self
.
generate_module_preamble
(
env
,
modules
,
h_code
)
...
@@ -294,7 +295,7 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
...
@@ -294,7 +295,7 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
for
codetup
,
name
in
env
.
utility_code_list
:
for
codetup
,
name
in
env
.
utility_code_list
:
globalstate
.
use_utility_code
(
codetup
,
name
)
globalstate
.
use_utility_code
(
codetup
,
name
)
globalstate
.
finalize_
writers
()
globalstate
.
finalize_
main_c_code
()
f
=
open_new_file
(
result
.
c_file
)
f
=
open_new_file
(
result
.
c_file
)
rootwriter
.
copyto
(
f
)
rootwriter
.
copyto
(
f
)
...
...
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