Commit 69cbed67 authored by Lisandro Dalcin's avatar Lisandro Dalcin

Pass clineno,lineno,filename to __Pyx_WriteUnraisable()

parent 87a575a7
...@@ -1459,9 +1459,14 @@ class FuncDefNode(StatNode, BlockNode): ...@@ -1459,9 +1459,14 @@ class FuncDefNode(StatNode, BlockNode):
else: else:
warning(self.entry.pos, "Unraisable exception in function '%s'." \ warning(self.entry.pos, "Unraisable exception in function '%s'." \
% self.entry.qualified_name, 0) % self.entry.qualified_name, 0)
format_tuple = (
self.entry.qualified_name,
Naming.clineno_cname,
Naming.lineno_cname,
Naming.filename_cname,
)
code.putln( code.putln(
'__Pyx_WriteUnraisable("%s");' % '__Pyx_WriteUnraisable("%s", %s, %s, %s);' % format_tuple)
self.entry.qualified_name)
env.use_utility_code(unraisable_exception_utility_code) env.use_utility_code(unraisable_exception_utility_code)
env.use_utility_code(restore_exception_utility_code) env.use_utility_code(restore_exception_utility_code)
default_retval = self.return_type.default_value default_retval = self.return_type.default_value
...@@ -7242,10 +7247,12 @@ bad: ...@@ -7242,10 +7247,12 @@ bad:
unraisable_exception_utility_code = UtilityCode( unraisable_exception_utility_code = UtilityCode(
proto = """ proto = """
static void __Pyx_WriteUnraisable(const char *name); /*proto*/ static void __Pyx_WriteUnraisable(const char *name, int clineno,
int lineno, const char *filename); /*proto*/
""", """,
impl = """ impl = """
static void __Pyx_WriteUnraisable(const char *name) { static void __Pyx_WriteUnraisable(const char *name, int clineno,
int lineno, const char *filename) {
PyObject *old_exc, *old_val, *old_tb; PyObject *old_exc, *old_val, *old_tb;
PyObject *ctx; PyObject *ctx;
__Pyx_ErrFetch(&old_exc, &old_val, &old_tb); __Pyx_ErrFetch(&old_exc, &old_val, &old_tb);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment