Identifier *Identifier::generateId(const char *prefix, size_t i) { OutBuffer buf; buf.writestring(prefix); buf.printf("%llu", (ulonglong)i); char *id = buf.peekString(); return idPool(id); }
void Journal::_removeFunctionId(VoidPtr ptr,VoidMethod method) { FuncDecl ** itr = &_FunctionList; do { if((*itr)->match(ptr, method)) { // Unlink and break. FuncDecl* decl = *itr; idPool().free( decl->id ); *itr = (*itr)->next; delete decl; return; } // Advance to next... itr = &((*itr)->next); } while(*itr); }
Identifier *Identifier::idPool(const char *s) { return idPool(s, strlen(s)); }