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
47849c8b
Commit
47849c8b
authored
9 years ago
by
Kevin Modzelewski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
this is all working now
parent
8237d41d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
27 deletions
+28
-27
src/runtime/types.cpp
src/runtime/types.cpp
+28
-27
No files found.
src/runtime/types.cpp
View file @
47849c8b
...
...
@@ -4168,31 +4168,6 @@ void setupRuntime() {
setupPyston
();
setupAST
();
// XXX
PyGC_Collect
();
// To make sure it creates any static objects
IN_SHUTDOWN
=
true
;
PyType_ClearCache
();
_Py_ReleaseInternedStrings
();
_PyUnicode_Fini
();
for
(
auto
b
:
classes
)
{
if
(
!
PyObject_IS_GC
(
b
))
{
b
->
clearAttrs
();
Py_CLEAR
(
b
->
tp_mro
);
}
}
for
(
auto
b
:
constants
)
{
Py_DECREF
(
b
);
}
for
(
auto
b
:
classes
)
{
Py_DECREF
(
b
);
}
// May need to run multiple collections to collect everything:
while
(
PyGC_Collect
())
;
PRINT_TOTAL_REFS
();
exit
(
0
);
// XXX
PyType_Ready
(
&
PyByteArrayIter_Type
);
PyType_Ready
(
&
PyCapsule_Type
);
...
...
@@ -4238,8 +4213,6 @@ void setupRuntime() {
PyMarshal_Init
();
initstrop
();
setupDefaultClassGCParticipation
();
assert
(
object_cls
->
tp_setattro
==
PyObject_GenericSetAttr
);
assert
(
none_cls
->
tp_setattro
==
PyObject_GenericSetAttr
);
...
...
@@ -4250,6 +4223,34 @@ void setupRuntime() {
setupSysEnd
();
TRACK_ALLOCATIONS
=
true
;
// XXX
PyGC_Collect
();
// To make sure it creates any static objects
IN_SHUTDOWN
=
true
;
PyType_ClearCache
();
PyOS_FiniInterrupts
();
_PyUnicode_Fini
();
for
(
auto
b
:
constants
)
{
Py_DECREF
(
b
);
}
// May need to run multiple collections to collect everything:
while
(
PyGC_Collect
())
;
_Py_ReleaseInternedStrings
();
for
(
auto
b
:
classes
)
{
if
(
!
PyObject_IS_GC
(
b
))
{
b
->
clearAttrs
();
Py_CLEAR
(
b
->
tp_mro
);
}
Py_DECREF
(
b
);
}
// May need to run multiple collections to collect everything:
while
(
PyGC_Collect
())
;
PRINT_TOTAL_REFS
();
exit
(
0
);
// XXX
}
BoxedModule
*
createModule
(
BoxedString
*
name
,
const
char
*
fn
,
const
char
*
doc
)
noexcept
{
...
...
This diff is collapsed.
Click to expand it.
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