Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
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
Kirill Smelkov
cpython
Commits
eea4718e
Commit
eea4718e
authored
Feb 11, 2003
by
Guido van Rossum
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix from SF #681367: inherit tp_as_buffer. This only applies to C
types -- Python types already inherited this.
parent
6c7438e7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
0 deletions
+6
-0
Misc/NEWS
Misc/NEWS
+4
-0
Objects/typeobject.c
Objects/typeobject.c
+2
-0
No files found.
Misc/NEWS
View file @
eea4718e
...
...
@@ -258,6 +258,10 @@ Build
C
API
-----
-
A
C
type
that
inherits
from
a
base
type
that
defines
tp_as_buffer
will
now
inherit
the
tp_as_buffer
pointer
if
it
doesn
't define one.
(SF #681367)
- The PyArg_Parse functions now issue a DeprecationWarning if a float
argument is provided when an integer is specified (this affects the '
b
',
'
B
', '
h
', '
H
', '
i
', and '
l
' codes). Future versions of Python will
...
...
Objects/typeobject.c
View file @
eea4718e
...
...
@@ -2915,6 +2915,8 @@ PyType_Ready(PyTypeObject *type)
type
->
tp_as_sequence
=
base
->
tp_as_sequence
;
if
(
type
->
tp_as_mapping
==
NULL
)
type
->
tp_as_mapping
=
base
->
tp_as_mapping
;
if
(
type
->
tp_as_buffer
==
NULL
)
type
->
tp_as_buffer
=
base
->
tp_as_buffer
;
}
/* Link into each base class's list of subclasses */
...
...
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