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
7f8cbdab
Commit
7f8cbdab
authored
Feb 28, 2016
by
Kevin Modzelewski
Browse files
Options
Browse Files
Download
Plain Diff
Merge commit '39b72d' into refcounting
parents
406c721e
39b72d9c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
+10
-0
src/capi/typeobject.cpp
src/capi/typeobject.cpp
+10
-0
No files found.
src/capi/typeobject.cpp
View file @
7f8cbdab
...
@@ -2082,6 +2082,16 @@ void add_operators(BoxedClass* cls) noexcept {
...
@@ -2082,6 +2082,16 @@ void add_operators(BoxedClass* cls) noexcept {
if
(
cls
->
tp_new
)
if
(
cls
->
tp_new
)
add_tp_new_wrapper
(
cls
);
add_tp_new_wrapper
(
cls
);
// Pyston change:
// Call PyType_Modified just to be extra safe. Our class initialization happens slightly differently from
// CPython's, so we end up calling add_operators at more different times than they do. The issue is that we
// sometimes call add_operators after calling typeLookup, so we might have already started using the method cache.
// Since add_operators directly adds class attributes, in theory it needs to call PyType_Modified, but CPython
// is able to avoid it since they know that no lookups had been cached yet.
// We could probably get to the point that we have the same guarantees, but it seems safer to just call
// PyType_Modified anyway.
PyType_Modified
(
cls
);
}
}
static
void
type_mro_modified
(
PyTypeObject
*
type
,
PyObject
*
bases
)
{
static
void
type_mro_modified
(
PyTypeObject
*
type
,
PyObject
*
bases
)
{
...
...
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