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
dd6cd65b
Commit
dd6cd65b
authored
May 03, 2003
by
Martin v. Löwis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implement tcl object __cmp__.
parent
c16f3bd8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
1 deletion
+12
-1
Modules/_tkinter.c
Modules/_tkinter.c
+12
-1
No files found.
Modules/_tkinter.c
View file @
dd6cd65b
...
@@ -810,6 +810,17 @@ PyTclObject_repr(PyTclObject *self)
...
@@ -810,6 +810,17 @@ PyTclObject_repr(PyTclObject *self)
return
PyString_FromString
(
buf
);
return
PyString_FromString
(
buf
);
}
}
static
int
PyTclObject_cmp
(
PyTclObject
*
self
,
PyTclObject
*
other
)
{
int
res
;
res
=
strcmp
(
Tcl_GetString
(
self
->
value
),
Tcl_GetString
(
other
->
value
));
if
(
res
<
0
)
return
-
1
;
if
(
res
>
0
)
return
1
;
return
0
;
}
PyDoc_STRVAR
(
get_typename__doc__
,
"name of the Tcl type"
);
PyDoc_STRVAR
(
get_typename__doc__
,
"name of the Tcl type"
);
static
PyObject
*
static
PyObject
*
...
@@ -843,7 +854,7 @@ statichere PyTypeObject PyTclObject_Type = {
...
@@ -843,7 +854,7 @@ statichere PyTypeObject PyTclObject_Type = {
0
,
/*tp_print*/
0
,
/*tp_print*/
0
,
/*tp_getattr*/
0
,
/*tp_getattr*/
0
,
/*tp_setattr*/
0
,
/*tp_setattr*/
0
,
/*tp_compare*/
(
cmpfunc
)
PyTclObject_cmp
,
/*tp_compare*/
(
reprfunc
)
PyTclObject_repr
,
/*tp_repr*/
(
reprfunc
)
PyTclObject_repr
,
/*tp_repr*/
0
,
/*tp_as_number*/
0
,
/*tp_as_number*/
0
,
/*tp_as_sequence*/
0
,
/*tp_as_sequence*/
...
...
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