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
dc0a2f2b
Commit
dc0a2f2b
authored
Jul 02, 2016
by
Marius Wachtler
Committed by
GitHub
Jul 02, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1276 from sizeoftank/work_for_issue1216
Add type.__basicsize__, type.__itemsize__
parents
f2bf812d
d42e89aa
Changes
2
Show 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 @
dc0a2f2b
# 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 @
dc0a2f2b
...
...
@@ -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