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
d42e89aa
Commit
d42e89aa
authored
Jun 28, 2016
by
sizeoftank
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add type.__basicsize__, type.__itemsize__
parent
f2bf812d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
1 deletion
+2
-1
from_cpython/Lib/test/test_types.py
from_cpython/Lib/test/test_types.py
+0
-1
src/runtime/types.cpp
src/runtime/types.cpp
+2
-0
No files found.
from_cpython/Lib/test/test_types.py
View file @
d42e89aa
# expected: fail
# Python test set -- part 6, built-in types
from
test.test_support
import
run_unittest
,
have_unicode
,
run_with_locale
,
\
...
...
src/runtime/types.cpp
View file @
d42e89aa
...
...
@@ -4353,6 +4353,8 @@ void setupRuntime() {
type_cls
->
tp_hash
=
(
hashfunc
)
_Py_HashPointer
;
type_cls
->
giveAttrDescriptor
(
"__module__"
,
type_module
,
type_set_module
);
type_cls
->
giveAttrMember
(
"__mro__"
,
T_OBJECT
,
offsetof
(
BoxedClass
,
tp_mro
));
type_cls
->
giveAttrMember
(
"__basicsize__"
,
T_PYSSIZET
,
offsetof
(
BoxedClass
,
tp_basicsize
));
type_cls
->
giveAttrMember
(
"__itemsize__"
,
T_PYSSIZET
,
offsetof
(
BoxedClass
,
tp_itemsize
));
type_cls
->
giveAttrMember
(
"__flags__"
,
T_LONG
,
offsetof
(
BoxedClass
,
tp_flags
));
type_cls
->
giveAttr
(
"__subclasses__"
,
new
BoxedFunction
(
FunctionMetadata
::
create
((
void
*
)
typeSubclasses
,
UNKNOWN
,
1
)));
...
...
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