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
0da972de
Commit
0da972de
authored
Sep 28, 2017
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix error handling when importing NumPy for Pythran modules.
parent
a4e9888c
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
9 deletions
+2
-9
Cython/Compiler/ModuleNode.py
Cython/Compiler/ModuleNode.py
+2
-1
Cython/Compiler/Symtab.py
Cython/Compiler/Symtab.py
+0
-8
No files found.
Cython/Compiler/ModuleNode.py
View file @
0da972de
...
...
@@ -2314,7 +2314,8 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
code
.
putln
(
"#endif"
)
code
.
putln
(
"/*--- Library function declarations ---*/"
)
env
.
generate_library_function_declarations
(
code
)
if
env
.
directives
[
'np_pythran'
]:
code
.
put_error_goto_if_neg
(
self
.
pos
,
"_import_array()"
)
code
.
putln
(
"/*--- Threads initialization code ---*/"
)
code
.
putln
(
"#if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS"
)
...
...
Cython/Compiler/Symtab.py
View file @
0da972de
...
...
@@ -901,10 +901,6 @@ class Scope(object):
def
use_entry_utility_code
(
self
,
entry
):
self
.
global_scope
().
use_entry_utility_code
(
entry
)
def
generate_library_function_declarations
(
self
,
code
):
# Generate extern decls for C library funcs used.
pass
def
defines_any
(
self
,
names
):
# Test whether any of the given names are defined in this scope.
for
name
in
names
:
...
...
@@ -1240,10 +1236,6 @@ class ModuleScope(Scope):
scope
=
scope
.
find_submodule
(
submodule
)
return
scope
def
generate_library_function_declarations
(
self
,
code
):
if
self
.
directives
[
'np_pythran'
]:
code
.
putln
(
"import_array();"
)
def
lookup_submodule
(
self
,
name
):
# Return scope for submodule of this module, or None.
if
'.'
in
name
:
...
...
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