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
69168064
Commit
69168064
authored
Feb 11, 2011
by
Martin v. Löwis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue #11135: Remove redundant doc field from PyType_Spec.
Reviewed by Georg Brandl.
parent
dafdd7f8
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
9 deletions
+7
-9
Include/object.h
Include/object.h
+0
-1
Misc/NEWS
Misc/NEWS
+2
-0
Modules/xxlimited.c
Modules/xxlimited.c
+4
-6
Tools/scripts/abitype.py
Tools/scripts/abitype.py
+1
-2
No files found.
Include/object.h
View file @
69168064
...
...
@@ -396,7 +396,6 @@ typedef struct{
typedef
struct
{
const
char
*
name
;
const
char
*
doc
;
int
basicsize
;
int
itemsize
;
int
flags
;
...
...
Misc/NEWS
View file @
69168064
...
...
@@ -10,6 +10,8 @@ What's New in Python 3.2?
Core and Builtins
-----------------
- Issue #11135: Remove redundant doc field from PyType_Spec.
- Issue #11067: Add PyType_GetFlags, to support PyUnicode_Check
in the limited ABI.
...
...
Modules/xxlimited.c
View file @
69168064
...
...
@@ -101,6 +101,7 @@ Xxo_setattr(XxoObject *self, char *name, PyObject *v)
}
static
PyType_Slot
Xxo_Type_slots
[]
=
{
{
Py_tp_doc
,
"The Xxo type"
},
{
Py_tp_dealloc
,
Xxo_dealloc
},
{
Py_tp_getattro
,
Xxo_getattro
},
{
Py_tp_setattr
,
Xxo_setattr
},
...
...
@@ -109,8 +110,7 @@ static PyType_Slot Xxo_Type_slots[] = {
};
static
PyType_Spec
Xxo_Type_spec
=
{
"xxmodule.Xxo"
,
NULL
,
"xxlimited.Xxo"
,
sizeof
(
XxoObject
),
0
,
Py_TPFLAGS_DEFAULT
,
...
...
@@ -178,7 +178,6 @@ static PyType_Spec Str_Type_spec = {
"xxlimited.Str"
,
0
,
0
,
0
,
Py_TPFLAGS_DEFAULT
|
Py_TPFLAGS_BASETYPE
,
Str_Type_slots
};
...
...
@@ -201,7 +200,6 @@ static PyType_Slot Null_Type_slots[] = {
static
PyType_Spec
Null_Type_spec
=
{
"xxlimited.Null"
,
NULL
,
/* doc */
0
,
/* basicsize */
0
,
/* itemsize */
Py_TPFLAGS_DEFAULT
|
Py_TPFLAGS_BASETYPE
,
...
...
@@ -230,7 +228,7 @@ PyDoc_STRVAR(module_doc,
static
struct
PyModuleDef
xxmodule
=
{
PyModuleDef_HEAD_INIT
,
"xx"
,
"xx
limited
"
,
module_doc
,
-
1
,
xx_methods
,
...
...
@@ -264,7 +262,7 @@ PyInit_xxlimited(void)
/* Add some symbolic constants to the module */
if
(
ErrorObject
==
NULL
)
{
ErrorObject
=
PyErr_NewException
(
"xx.error"
,
NULL
,
NULL
);
ErrorObject
=
PyErr_NewException
(
"xx
limited
.error"
,
NULL
,
NULL
);
if
(
ErrorObject
==
NULL
)
goto
fail
;
}
...
...
Tools/scripts/abitype.py
View file @
69168064
...
...
@@ -162,7 +162,7 @@ def make_slots(name, fields):
res
=
[]
res
.
append
(
'static PyType_Slot %s_slots[] = {'
%
name
)
# defaults for spec
spec
=
{
'tp_
doc'
:
'NULL'
,
'tp_
itemsize'
:
'0'
}
spec
=
{
'tp_itemsize'
:
'0'
}
for
i
,
val
in
enumerate
(
fields
):
if
val
.
endswith
(
'0'
):
continue
...
...
@@ -174,7 +174,6 @@ def make_slots(name, fields):
res
.
append
(
'};'
)
res
.
append
(
'static PyType_Spec %s_spec = {'
%
name
)
res
.
append
(
' %s,'
%
spec
[
'tp_name'
])
res
.
append
(
' %s,'
%
spec
[
'tp_doc'
])
res
.
append
(
' %s,'
%
spec
[
'tp_basicsize'
])
res
.
append
(
' %s,'
%
spec
[
'tp_itemsize'
])
res
.
append
(
' %s,'
%
spec
[
'tp_flags'
])
...
...
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