Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
Pyston
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
Boxiang Sun
Pyston
Commits
80f4bc34
Commit
80f4bc34
authored
Sep 08, 2015
by
Kevin Modzelewski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Callattr fix
Used a hardcoded CXX exception style in the non-rewriteable case.
parent
414d207f
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
1 deletion
+15
-1
src/runtime/objmodel.cpp
src/runtime/objmodel.cpp
+1
-1
test/tests/callattr_exceptions.py
test/tests/callattr_exceptions.py
+14
-0
No files found.
src/runtime/objmodel.cpp
View file @
80f4bc34
...
@@ -2821,7 +2821,7 @@ Box* callattrInternal(Box* obj, BoxedString* attr, LookupScope scope, CallRewrit
...
@@ -2821,7 +2821,7 @@ Box* callattrInternal(Box* obj, BoxedString* attr, LookupScope scope, CallRewrit
r_val
=
grewrite_args
.
out_rtn
;
r_val
=
grewrite_args
.
out_rtn
;
}
}
}
else
{
}
else
{
val
=
getattrInternalEx
<
CXX
>
(
obj
,
attr
,
NULL
,
scope
==
CLASS_ONLY
,
true
,
&
bind_obj
,
&
r_bind_obj
);
val
=
getattrInternalEx
<
S
>
(
obj
,
attr
,
NULL
,
scope
==
CLASS_ONLY
,
true
,
&
bind_obj
,
&
r_bind_obj
);
}
}
if
(
val
==
NULL
)
{
if
(
val
==
NULL
)
{
...
...
test/tests/callattr_exceptions.py
0 → 100644
View file @
80f4bc34
# Make sure that callattrs handle exceptions (including
# different exception styles) correctly.
class
C
(
object
):
def
__getattr__
(
self
,
attr
):
raise
ValueError
()
def
f
():
c
=
C
()
for
i
in
xrange
(
10000
):
try
:
c
.
foo
()
except
ValueError
:
pass
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