splay-tree.h (splay_tree_compare_pointers): Declare.
1999-04-02 Mark Mitchell <mark@codesourcery.com> * splay-tree.h (splay_tree_compare_pointers): Declare. 1999-04-02 Mark Mitchell <mark@codesourcery.com> * splay-tree.h (splay_tree_compare_pointers): Define. From-SVN: r26132
This commit is contained in:
parent
2fa6b2d2ad
commit
ae7f727035
@ -1,3 +1,7 @@
|
||||
1999-04-02 Mark Mitchell <mark@codesourcery.com>
|
||||
|
||||
* splay-tree.h (splay_tree_compare_pointers): Declare.
|
||||
|
||||
1999-03-30 Mark Mitchell <mark@codesourcery.com>
|
||||
|
||||
* splay-tree.h (splay_tree_compare_ints): Declare.
|
||||
|
@ -106,6 +106,8 @@ extern int splay_tree_foreach PARAMS((splay_tree,
|
||||
void*));
|
||||
extern int splay_tree_compare_ints PARAMS((splay_tree_key,
|
||||
splay_tree_key));
|
||||
extern int splay_tree_compare_pointers PARAMS((splay_tree_key,
|
||||
splay_tree_key));
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
@ -1,3 +1,7 @@
|
||||
1999-04-02 Mark Mitchell <mark@codesourcery.com>
|
||||
|
||||
* splay-tree.h (splay_tree_compare_pointers): Define.
|
||||
|
||||
1999-03-30 Mark Mitchell <mark@codesourcery.com>
|
||||
|
||||
* splay-tree.c (splay_tree_compare_ints): Define.
|
||||
|
@ -351,3 +351,18 @@ splay_tree_compare_ints (k1, k2)
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Splay-tree comparison function, treating the keys as pointers. */
|
||||
|
||||
int
|
||||
splay_tree_compare_pointers (k1, k2)
|
||||
splay_tree_key k1;
|
||||
splay_tree_key k2;
|
||||
{
|
||||
if ((char*) k1 < (char*) k2)
|
||||
return -1;
|
||||
else if ((char*) k1 > (char*) k2)
|
||||
return 1;
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user