//
/*
***************************************************************************
-* Copyright (C) 2002-2003 International Business Machines Corporation *
+* Copyright (C) 2002-2005 International Business Machines Corporation *
* and others. All rights reserved. *
***************************************************************************
*/
// when the hash table is deleted.
//
U_CDECL_BEGIN
-static void U_EXPORT2 U_CALLCONV RBBISymbolTableEntry_deleter(void *p) {
+static void U_CALLCONV RBBISymbolTableEntry_deleter(void *p) {
RBBISymbolTableEntry *px = (RBBISymbolTableEntry *)p;
delete px;
}
{
fHashTable = NULL;
fCachedSetLookup = NULL;
+
+ fHashTable = uhash_open(uhash_hashUnicodeString, uhash_compareUnicodeString, NULL, &status);
+ // uhash_open checks status
if (U_FAILURE(status)) {
return;
}
-
- fHashTable = uhash_open(uhash_hashUnicodeString, uhash_compareUnicodeString, &status);
uhash_setValueDeleter(fHashTable, RBBISymbolTableEntry_deleter);
}
//
// RBBISymbolTable::print Debugging function, dump out the symbol table contents.
//
-void RBBISymbolTable::print() const {
+#ifdef RBBI_DEBUG
+void RBBISymbolTable::rbbiSymtablePrint() const {
RBBIDebugPrintf("Variable Definitions\n"
"Name Node Val String Val\n"
"----------------------------------------------------------------------\n");
}
RBBISymbolTableEntry *s = (RBBISymbolTableEntry *)e->value.pointer;
- RBBINode::printUnicodeString(s->key, 15);
+ RBBI_DEBUG_printUnicodeString(s->key, 15);
RBBIDebugPrintf(" %8p ", (void *)s->val);
- RBBINode::printUnicodeString(s->val->fLeftChild->fText);
+ RBBI_DEBUG_printUnicodeString(s->val->fLeftChild->fText);
RBBIDebugPrintf("\n");
}
break;
}
RBBISymbolTableEntry *s = (RBBISymbolTableEntry *)e->value.pointer;
- RBBINode::printUnicodeString(s->key);
- s->val->fLeftChild->printTree();
+ RBBI_DEBUG_printUnicodeString(s->key);
+ s->val->fLeftChild->printTree(TRUE);
RBBIDebugPrintf("\n");
}
}
-
+#endif