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
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
nexedi
cython
Commits
2ef20620
Commit
2ef20620
authored
Feb 25, 2009
by
Robert Bradshaw
Browse files
Options
Browse Files
Download
Plain Diff
merge
parents
37c57643
a74288bc
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
7 deletions
+12
-7
Cython/Compiler/Symtab.py
Cython/Compiler/Symtab.py
+2
-2
Cython/Runtime/refnanny.pyx
Cython/Runtime/refnanny.pyx
+10
-5
No files found.
Cython/Compiler/Symtab.py
View file @
2ef20620
...
@@ -904,11 +904,11 @@ class ModuleScope(Scope):
...
@@ -904,11 +904,11 @@ class ModuleScope(Scope):
def add_imported_module(self, scope):
def add_imported_module(self, scope):
if scope not in self.cimported_modules:
if scope not in self.cimported_modules:
for filename in scope.include_files:
self.add_include_file(filename)
self.cimported_modules.append(scope)
self.cimported_modules.append(scope)
for m in scope.cimported_modules:
for m in scope.cimported_modules:
self.add_imported_module(m)
self.add_imported_module(m)
for filename in scope.include_files:
self.add_include_file(filename)
def add_imported_entry(self, name, entry, pos):
def add_imported_entry(self, name, entry, pos):
if entry not in self.entries:
if entry not in self.entries:
...
...
Cython/Runtime/refnanny.pyx
View file @
2ef20620
...
@@ -62,7 +62,7 @@ class Context(object):
...
@@ -62,7 +62,7 @@ class Context(object):
else
:
else
:
return
None
return
None
def
report_unraisable
(
e
):
cp
def
report_unraisable
(
e
):
try
:
try
:
print
"refnanny raised an exception: %s"
%
e
print
"refnanny raised an exception: %s"
%
e
except
:
except
:
...
@@ -73,6 +73,11 @@ def report_unraisable(e):
...
@@ -73,6 +73,11 @@ def report_unraisable(e):
# exception-handling code.
# exception-handling code.
cdef
PyObject
*
NewContext
(
char
*
funcname
,
int
lineno
,
char
*
filename
)
except
NULL
:
cdef
PyObject
*
NewContext
(
char
*
funcname
,
int
lineno
,
char
*
filename
)
except
NULL
:
if
Context
is
None
:
# Context may be None during finalize phase.
# In that case, we don't want to be doing anything fancy
# like caching and resetting exceptions.
return
NULL
cdef
PyObject
*
type
=
NULL
,
*
value
=
NULL
,
*
tb
=
NULL
cdef
PyObject
*
type
=
NULL
,
*
value
=
NULL
,
*
tb
=
NULL
cdef
PyObject
*
result
=
NULL
cdef
PyObject
*
result
=
NULL
PyErr_Fetch
(
&
type
,
&
value
,
&
tb
)
PyErr_Fetch
(
&
type
,
&
value
,
&
tb
)
...
@@ -125,18 +130,18 @@ cdef void DECREF(PyObject* ctx, PyObject* obj, int lineno):
...
@@ -125,18 +130,18 @@ cdef void DECREF(PyObject* ctx, PyObject* obj, int lineno):
if
obj
is
not
NULL
:
Py_DECREF
(
<
object
>
obj
)
if
obj
is
not
NULL
:
Py_DECREF
(
<
object
>
obj
)
cdef
void
FinishContext
(
PyObject
**
ctx
):
cdef
void
FinishContext
(
PyObject
**
ctx
):
if
ctx
==
NULL
or
ctx
[
0
]
==
NULL
:
# We should have reported an error earlier.
return
cdef
PyObject
*
type
=
NULL
,
*
value
=
NULL
,
*
tb
=
NULL
cdef
PyObject
*
type
=
NULL
,
*
value
=
NULL
,
*
tb
=
NULL
cdef
object
errors
=
None
cdef
object
errors
=
None
PyErr_Fetch
(
&
type
,
&
value
,
&
tb
)
PyErr_Fetch
(
&
type
,
&
value
,
&
tb
)
try
:
try
:
if
ctx
==
NULL
:
assert
False
,
"ctx is NULL"
if
ctx
[
0
]
==
NULL
:
assert
False
,
"ctx[0] is NULL"
errors
=
(
<
object
>
ctx
[
0
]).
end
()
errors
=
(
<
object
>
ctx
[
0
]).
end
()
pos
=
(
<
object
>
ctx
[
0
]).
filename
,
(
<
object
>
ctx
[
0
]).
name
pos
=
(
<
object
>
ctx
[
0
]).
filename
,
(
<
object
>
ctx
[
0
]).
name
if
errors
:
if
errors
:
print
u"%s: %s()"
%
pos
print
u"%s: %s()"
%
pos
print
errors
# raise Error(errors)
print
errors
except
Exception
,
e
:
except
Exception
,
e
:
report_unraisable
(
e
)
report_unraisable
(
e
)
Py_XDECREF
(
<
object
>
ctx
[
0
])
Py_XDECREF
(
<
object
>
ctx
[
0
])
...
...
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