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
3b0e42ea
Commit
3b0e42ea
authored
Jan 13, 2016
by
Marius Wachtler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
handle duplicate PyType_Ready call
parent
3e2b8eb3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
0 deletions
+12
-0
src/capi/typeobject.cpp
src/capi/typeobject.cpp
+6
-0
test/tests/import_test.py
test/tests/import_test.py
+6
-0
No files found.
src/capi/typeobject.cpp
View file @
3b0e42ea
...
@@ -3404,6 +3404,12 @@ extern "C" void PyType_GiveHcAttrsDictDescr(PyTypeObject* cls) noexcept {
...
@@ -3404,6 +3404,12 @@ extern "C" void PyType_GiveHcAttrsDictDescr(PyTypeObject* cls) noexcept {
extern
"C"
int
PyType_Ready
(
PyTypeObject
*
cls
)
noexcept
{
extern
"C"
int
PyType_Ready
(
PyTypeObject
*
cls
)
noexcept
{
ASSERT
(
!
cls
->
is_pyston_class
,
"should not call this on Pyston classes"
);
ASSERT
(
!
cls
->
is_pyston_class
,
"should not call this on Pyston classes"
);
// if this type is already in ready state we are finished.
if
(
cls
->
tp_flags
&
Py_TPFLAGS_READY
)
{
assert
(
cls
->
tp_dict
!=
NULL
);
return
0
;
}
gc
::
registerNonheapRootObject
(
cls
,
sizeof
(
PyTypeObject
));
gc
::
registerNonheapRootObject
(
cls
,
sizeof
(
PyTypeObject
));
// unhandled fields:
// unhandled fields:
...
...
test/tests/import_test.py
View file @
3b0e42ea
...
@@ -29,3 +29,9 @@ print y
...
@@ -29,3 +29,9 @@ print y
print
__name__
print
__name__
print
__import__
(
"import_target"
)
is
import_target
print
__import__
(
"import_target"
)
is
import_target
import
sys
import
_multiprocessing
del
_multiprocessing
del
sys
.
modules
[
"_multiprocessing"
]
import
_multiprocessing
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