mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-20 22:59:34 -05:00
use 'int' instead of 'char' for balance factor.
(barely) hide more internals.
This commit is contained in:
parent
f704f1c475
commit
95b3c92df7
1 changed files with 3 additions and 2 deletions
|
|
@ -37,7 +37,7 @@ typedef struct avlnode Avlnode;
|
||||||
#ifdef AVL_INTERNAL
|
#ifdef AVL_INTERNAL
|
||||||
struct avlnode {
|
struct avlnode {
|
||||||
void* avl_data;
|
void* avl_data;
|
||||||
signed char avl_bf;
|
signed int avl_bf;
|
||||||
struct avlnode *avl_left;
|
struct avlnode *avl_left;
|
||||||
struct avlnode *avl_right;
|
struct avlnode *avl_right;
|
||||||
};
|
};
|
||||||
|
|
@ -48,12 +48,13 @@ struct avlnode {
|
||||||
#define LH (-1)
|
#define LH (-1)
|
||||||
#define EH 0
|
#define EH 0
|
||||||
#define RH 1
|
#define RH 1
|
||||||
#endif
|
|
||||||
|
|
||||||
/* avl routines */
|
/* avl routines */
|
||||||
#define avl_getone(x) ((x) == 0 ? 0 : (x)->avl_data)
|
#define avl_getone(x) ((x) == 0 ? 0 : (x)->avl_data)
|
||||||
#define avl_onenode(x) ((x) == 0 || ((x)->avl_left == 0 && (x)->avl_right == 0))
|
#define avl_onenode(x) ((x) == 0 || ((x)->avl_left == 0 && (x)->avl_right == 0))
|
||||||
|
|
||||||
|
#endif /* AVL_INTERNALS */
|
||||||
|
|
||||||
typedef int (*AVL_APPLY) LDAP_P((void *, void*));
|
typedef int (*AVL_APPLY) LDAP_P((void *, void*));
|
||||||
typedef int (*AVL_CMP) LDAP_P((void*, void*));
|
typedef int (*AVL_CMP) LDAP_P((void*, void*));
|
||||||
typedef int (*AVL_DUP) LDAP_P((void*, void*));
|
typedef int (*AVL_DUP) LDAP_P((void*, void*));
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue