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
e38aa0d5
Commit
e38aa0d5
authored
Aug 22, 2014
by
Kevin Modzelewski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add some more checking -- don't want non-gc values to sneak in again
parent
918b0f00
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
0 deletions
+8
-0
src/runtime/capi.cpp
src/runtime/capi.cpp
+6
-0
src/runtime/types.cpp
src/runtime/types.cpp
+2
-0
No files found.
src/runtime/capi.cpp
View file @
e38aa0d5
...
...
@@ -289,6 +289,9 @@ extern "C" void _PyErr_BadInternalCall(const char* filename, int lineno) {
}
extern
"C"
PyObject
*
PyObject_Init
(
PyObject
*
op
,
PyTypeObject
*
tp
)
{
assert
(
gc
::
isValidGCObject
(
op
));
assert
(
gc
::
isValidGCObject
(
tp
));
RELEASE_ASSERT
(
op
,
""
);
RELEASE_ASSERT
(
tp
,
""
);
Py_TYPE
(
op
)
=
tp
;
...
...
@@ -296,6 +299,9 @@ extern "C" PyObject* PyObject_Init(PyObject* op, PyTypeObject* tp) {
}
extern
"C"
PyVarObject
*
PyObject_InitVar
(
PyVarObject
*
op
,
PyTypeObject
*
tp
,
Py_ssize_t
size
)
{
assert
(
gc
::
isValidGCObject
(
op
));
assert
(
gc
::
isValidGCObject
(
tp
));
RELEASE_ASSERT
(
op
,
""
);
RELEASE_ASSERT
(
tp
,
""
);
Py_TYPE
(
op
)
=
tp
;
...
...
src/runtime/types.cpp
View file @
e38aa0d5
...
...
@@ -303,6 +303,8 @@ extern "C" Box* createUserClass(std::string* name, Box* _base, Box* _attr_dict)
ASSERT
(
_attr_dict
->
cls
==
dict_cls
,
"%s"
,
getTypeName
(
_attr_dict
)
->
c_str
());
BoxedDict
*
attr_dict
=
static_cast
<
BoxedDict
*>
(
_attr_dict
);
RELEASE_ASSERT
(
attr_dict
->
d
.
count
(
boxStrConstant
(
"__metaclass__"
))
==
0
,
"metaclasses not supported yet"
);
BoxedClass
*
made
;
if
(
base
->
instancesHaveAttrs
())
{
...
...
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