Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
ZEO
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
ZEO
Commits
6f44a9df
Commit
6f44a9df
authored
Oct 27, 2010
by
Jim Fulton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make chack for default comparison work for Python 2.5.
parent
6600ecce
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
2 deletions
+12
-2
src/BTrees/objectkeymacros.h
src/BTrees/objectkeymacros.h
+12
-2
No files found.
src/BTrees/objectkeymacros.h
View file @
6f44a9df
...
...
@@ -9,10 +9,20 @@ static PyObject *object_;
static
int
check_argument_cmp
(
PyObject
*
arg
)
{
/* printf("check cmp %p %p %p %p\n", */
/* arg->ob_type->tp_richcompare, */
/* ((PyTypeObject *)object_)->ob_type->tp_richcompare, */
/* arg->ob_type->tp_compare, */
/* ((PyTypeObject *)object_)->ob_type->tp_compare); */
if
(
arg
->
ob_type
->
tp_richcompare
==
NULL
&&
arg
->
ob_type
->
tp_compare
==
((
PyTypeObject
*
)
object_
)
->
ob_type
->
tp_compare
#if PY_MAJOR_VERSION==2 && PY_MINOR_VERSION < 6
arg
->
ob_type
->
tp_compare
==
NULL
#else
arg
->
ob_type
->
tp_compare
==
((
PyTypeObject
*
)
object_
)
->
ob_type
->
tp_compare
#endif
)
{
PyErr_SetString
(
PyExc_TypeError
,
"Object has default comparison"
);
...
...
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