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
7d408697
Commit
7d408697
authored
May 29, 2019
by
Inada Naoki
Committed by
GitHub
May 29, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove unnecessary tp_dealloc (GH-13647)
parent
ca804955
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
4 additions
and
30 deletions
+4
-30
Objects/bytesobject.c
Objects/bytesobject.c
+1
-9
Objects/complexobject.c
Objects/complexobject.c
+1
-7
Objects/longobject.c
Objects/longobject.c
+1
-7
Objects/unicodeobject.c
Objects/unicodeobject.c
+1
-7
No files found.
Objects/bytesobject.c
View file @
7d408697
...
...
@@ -1077,14 +1077,6 @@ _PyBytes_FormatEx(const char *format, Py_ssize_t format_len,
return
NULL
;
}
/* =-= */
static
void
bytes_dealloc
(
PyObject
*
op
)
{
Py_TYPE
(
op
)
->
tp_free
(
op
);
}
/* Unescape a backslash-escaped string. If unicode is non-zero,
the string is a u-literal. If recode_encoding is non-zero,
the string is UTF-8 encoded and should be re-encoded in the
...
...
@@ -2875,7 +2867,7 @@ PyTypeObject PyBytes_Type = {
"bytes"
,
PyBytesObject_SIZE
,
sizeof
(
char
),
bytes_dealloc
,
/* tp_dealloc */
0
,
/* tp_dealloc */
0
,
/* tp_print */
0
,
/* tp_getattr */
0
,
/* tp_setattr */
...
...
Objects/complexobject.c
View file @
7d408697
...
...
@@ -343,12 +343,6 @@ PyComplex_AsCComplex(PyObject *op)
}
}
static
void
complex_dealloc
(
PyObject
*
op
)
{
op
->
ob_type
->
tp_free
(
op
);
}
static
PyObject
*
complex_repr
(
PyComplexObject
*
v
)
{
...
...
@@ -1118,7 +1112,7 @@ PyTypeObject PyComplex_Type = {
"complex"
,
sizeof
(
PyComplexObject
),
0
,
complex_dealloc
,
/* tp_dealloc */
0
,
/* tp_dealloc */
0
,
/* tp_print */
0
,
/* tp_getattr */
0
,
/* tp_setattr */
...
...
Objects/longobject.c
View file @
7d408697
...
...
@@ -3053,12 +3053,6 @@ PyLong_AsDouble(PyObject *v)
/* Methods */
static
void
long_dealloc
(
PyObject
*
v
)
{
Py_TYPE
(
v
)
->
tp_free
(
v
);
}
static
int
long_compare
(
PyLongObject
*
a
,
PyLongObject
*
b
)
{
...
...
@@ -5628,7 +5622,7 @@ PyTypeObject PyLong_Type = {
"int"
,
/* tp_name */
offsetof
(
PyLongObject
,
ob_digit
),
/* tp_basicsize */
sizeof
(
digit
),
/* tp_itemsize */
long_dealloc
,
/* tp_dealloc */
0
,
/* tp_dealloc */
0
,
/* tp_print */
0
,
/* tp_getattr */
0
,
/* tp_setattr */
...
...
Objects/unicodeobject.c
View file @
7d408697
...
...
@@ -8099,19 +8099,13 @@ static PyMethodDef encoding_map_methods[] = {
{
0
}
};
static
void
encoding_map_dealloc
(
PyObject
*
o
)
{
PyObject_FREE
(
o
);
}
static
PyTypeObject
EncodingMapType
=
{
PyVarObject_HEAD_INIT
(
NULL
,
0
)
"EncodingMap"
,
/*tp_name*/
sizeof
(
struct
encoding_map
),
/*tp_basicsize*/
0
,
/*tp_itemsize*/
/* methods */
encoding_map_dealloc
,
/*tp_dealloc*/
0
,
/*tp_dealloc*/
0
,
/*tp_print*/
0
,
/*tp_getattr*/
0
,
/*tp_setattr*/
...
...
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