Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
eee3fd49
Commit
eee3fd49
authored
Apr 05, 1992
by
Guido van Rossum
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(Hopefully) fix bug in reference count in call_exc_trace()
plus minor rearrangements found during debugging
parent
e765f7db
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
12 deletions
+7
-12
Python/ceval.c
Python/ceval.c
+7
-12
No files found.
Python/ceval.c
View file @
eee3fd49
/***********************************************************
Copyright 1991 by Stichting Mathematisch Centrum, Amsterdam, The
Copyright 1991
, 1992
by Stichting Mathematisch Centrum, Amsterdam, The
Netherlands.
All Rights Reserved
...
...
@@ -1106,7 +1106,6 @@ eval_code(co, globals, locals, arg)
sysset
(
"exc_traceback"
,
v
);
sysset
(
"exc_value"
,
val
);
sysset
(
"exc_type"
,
exc
);
err_clear
();
}
PUSH
(
v
);
PUSH
(
val
);
...
...
@@ -1192,21 +1191,19 @@ call_exc_trace(p_trace, p_newtrace, f)
err_get
(
&
type
,
&
value
);
traceback
=
tb_fetch
();
arg
=
newtupleobject
(
3
);
if
(
arg
==
NULL
)
{
err
=
-
1
;
if
(
arg
==
NULL
)
goto
cleanup
;
}
settupleitem
(
arg
,
0
,
type
);
settupleitem
(
arg
,
1
,
value
);
settupleitem
(
arg
,
2
,
traceback
);
err
=
call_trace
(
p_trace
,
p_newtrace
,
f
,
"exception"
,
arg
);
XDECREF
(
arg
);
cleanup:
if
(
!
err
)
{
cleanup:
/* Restore original exception */
err_setval
(
type
,
value
);
tb_store
(
traceback
);
}
XDECREF
(
arg
);
}
static
int
...
...
@@ -1254,12 +1251,13 @@ call_trace(p_trace, p_newtrace, f, msg, arg)
if
(
res
==
NULL
)
{
/* The trace proc raised an exception */
tb_here
(
f
);
X
DECREF
(
*
p_trace
);
DECREF
(
*
p_trace
);
*
p_trace
=
NULL
;
if
(
p_newtrace
)
{
XDECREF
(
*
p_newtrace
);
*
p_newtrace
=
NULL
;
}
return
-
1
;
}
else
{
if
(
p_newtrace
)
{
...
...
@@ -1272,11 +1270,8 @@ call_trace(p_trace, p_newtrace, f, msg, arg)
}
}
DECREF
(
res
);
}
if
(
res
==
NULL
)
return
-
1
;
else
return
0
;
}
}
object
*
...
...
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