//bintree宏定义

#include "binnode.hpp"

#define isRoot(x) (!(x->parent))
#define isLC(x) (!isRoot(x)&&((x)==(x->parent->lc))
#define isRC(x) (!isRoot(x)&&((x)==(x->parent->rc))
#define hasLC(x) (x->lc)
#define hasRC(x) (x->rc)