# HG changeset patch # User Tuomo Valkonen # Date 1171927098 -3600 # Node ID 2b4dd5f948bc8755641bd4a6651f51e012897c5a # Parent da2a985da6ee6bad0b6c28841944e98153ad7e1a Better handling of STRINGID_NONE diff -r da2a985da6ee -r 2b4dd5f948bc stringstore.c --- a/stringstore.c Mon Jan 29 15:11:39 2007 +0100 +++ b/stringstore.c Tue Feb 20 00:18:18 2007 +0100 @@ -105,6 +105,9 @@ StringId stringstore_alloc(const char *str) { + if(str==NULL) + return STRINGID_NONE; + return stringstore_alloc_n(str, strlen(str)); } @@ -113,10 +116,8 @@ { Rb_node node=(Rb_node)id; - if(node==NULL){ - warn("Attempt to free un-allocated string from stringstore."); + if(node==NULL) return; - } if(node->v.ival<=0){ warn("Stringstore reference count corrupted.");