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
346f1a82
Commit
346f1a82
authored
Aug 07, 2007
by
Guido van Rossum
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Kill remaining tp_print definitions.
parent
04dbf3b5
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
76 deletions
+4
-76
Modules/_collectionsmodule.c
Modules/_collectionsmodule.c
+2
-58
Modules/_sqlite/row.c
Modules/_sqlite/row.c
+1
-6
PC/_winreg.c
PC/_winreg.c
+1
-12
No files found.
Modules/_collectionsmodule.c
View file @
346f1a82
...
...
@@ -633,46 +633,6 @@ deque_repr(PyObject *deque)
return
result
;
}
static
int
deque_tp_print
(
PyObject
*
deque
,
FILE
*
fp
,
int
flags
)
{
PyObject
*
it
,
*
item
;
char
*
emit
=
""
;
/* No separator emitted on first pass */
char
*
separator
=
", "
;
int
i
;
i
=
Py_ReprEnter
(
deque
);
if
(
i
!=
0
)
{
if
(
i
<
0
)
return
i
;
fputs
(
"[...]"
,
fp
);
return
0
;
}
it
=
PyObject_GetIter
(
deque
);
if
(
it
==
NULL
)
return
-
1
;
fputs
(
"deque(["
,
fp
);
while
((
item
=
PyIter_Next
(
it
))
!=
NULL
)
{
fputs
(
emit
,
fp
);
emit
=
separator
;
if
(
PyObject_Print
(
item
,
fp
,
0
)
!=
0
)
{
Py_DECREF
(
item
);
Py_DECREF
(
it
);
Py_ReprLeave
(
deque
);
return
-
1
;
}
Py_DECREF
(
item
);
}
Py_ReprLeave
(
deque
);
Py_DECREF
(
it
);
if
(
PyErr_Occurred
())
return
-
1
;
fputs
(
"])"
,
fp
);
return
0
;
}
static
PyObject
*
deque_richcompare
(
PyObject
*
v
,
PyObject
*
w
,
int
op
)
{
...
...
@@ -824,7 +784,7 @@ static PyTypeObject deque_type = {
0
,
/* tp_itemsize */
/* methods */
(
destructor
)
deque_dealloc
,
/* tp_dealloc */
deque_tp_print
,
/* tp_print */
0
,
/* tp_print */
0
,
/* tp_getattr */
0
,
/* tp_setattr */
0
,
/* tp_compare */
...
...
@@ -1179,22 +1139,6 @@ defdict_dealloc(defdictobject *dd)
PyDict_Type
.
tp_dealloc
((
PyObject
*
)
dd
);
}
static
int
defdict_print
(
defdictobject
*
dd
,
FILE
*
fp
,
int
flags
)
{
int
sts
;
fprintf
(
fp
,
"defaultdict("
);
if
(
dd
->
default_factory
==
NULL
)
fprintf
(
fp
,
"None"
);
else
{
PyObject_Print
(
dd
->
default_factory
,
fp
,
0
);
}
fprintf
(
fp
,
", "
);
sts
=
PyDict_Type
.
tp_print
((
PyObject
*
)
dd
,
fp
,
0
);
fprintf
(
fp
,
")"
);
return
sts
;
}
static
PyObject
*
defdict_repr
(
defdictobject
*
dd
)
{
...
...
@@ -1277,7 +1221,7 @@ static PyTypeObject defdict_type = {
0
,
/* tp_itemsize */
/* methods */
(
destructor
)
defdict_dealloc
,
/* tp_dealloc */
(
printfunc
)
defdict_print
,
/* tp_print */
0
,
/* tp_print */
0
,
/* tp_getattr */
0
,
/* tp_setattr */
0
,
/* tp_compare */
...
...
Modules/_sqlite/row.c
View file @
346f1a82
...
...
@@ -159,11 +159,6 @@ PyObject* pysqlite_row_keys(pysqlite_Row* self, PyObject* args, PyObject* kwargs
return
list
;
}
static
int
pysqlite_row_print
(
pysqlite_Row
*
self
,
FILE
*
fp
,
int
flags
)
{
return
(
&
PyTuple_Type
)
->
tp_print
(
self
->
data
,
fp
,
flags
);
}
static
PyObject
*
pysqlite_iter
(
pysqlite_Row
*
self
)
{
return
PyObject_GetIter
(
self
->
data
);
...
...
@@ -188,7 +183,7 @@ PyTypeObject pysqlite_RowType = {
sizeof
(
pysqlite_Row
),
/* tp_basicsize */
0
,
/* tp_itemsize */
(
destructor
)
pysqlite_row_dealloc
,
/* tp_dealloc */
(
printfunc
)
pysqlite_row_print
,
/* tp_print */
0
,
/* tp_print */
0
,
/* tp_getattr */
0
,
/* tp_setattr */
0
,
/* tp_compare */
...
...
PC/_winreg.c
View file @
346f1a82
...
...
@@ -387,17 +387,6 @@ PyHKEY_intFunc(PyObject *ob)
return
PyLong_FromVoidPtr
(
pyhkey
->
hkey
);
}
static
int
PyHKEY_printFunc
(
PyObject
*
ob
,
FILE
*
fp
,
int
flags
)
{
PyHKEYObject
*
pyhkey
=
(
PyHKEYObject
*
)
ob
;
char
resBuf
[
160
];
wsprintf
(
resBuf
,
"<PyHKEY at %p (%p)>"
,
ob
,
pyhkey
->
hkey
);
fputs
(
resBuf
,
fp
);
return
0
;
}
static
PyObject
*
PyHKEY_strFunc
(
PyObject
*
ob
)
{
...
...
@@ -464,7 +453,7 @@ PyTypeObject PyHKEY_Type =
sizeof
(
PyHKEYObject
),
0
,
PyHKEY_deallocFunc
,
/* tp_dealloc */
PyHKEY_printFunc
,
/* tp_print */
0
,
/* tp_print */
PyHKEY_getattr
,
/* tp_getattr */
0
,
/* tp_setattr */
PyHKEY_compareFunc
,
/* tp_compare */
...
...
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