{
set *id_set = handle;
- /* GL: Who added this assert? And why? */
- //assert(len > 0);
return (ident *)set_hinsert0(id_set, str, len, ID_HASH(unsigned char, str, len));
}
static ident *set_new_id_from_str(void *handle, const char *str)
{
assert(str);
- return (ident *)set_new_id_from_chars(handle, str, strlen(str));
+ return set_new_id_from_chars(handle, str, strlen(str));
}
/**
/**
* Default implementation using libfirm sets.
*/
-void set_finish_ident(void *handle) {
+static void set_finish_ident(void *handle)
+{
set *id_set = handle;
del_set(id_set);
ident *new_id_from_str(const char *str)
{
- assert(str);
+ assert(str != NULL);
return impl.new_id_from_str(impl.handle, str);
}
ident *new_id_from_chars(const char *str, int len)
{
- assert(len > 0);
return impl.new_id_from_chars(impl.handle, str, len);
}
return impl.get_id_strlen(impl.handle, id);
}
-void finish_ident(void) {
+void finish_ident(void)
+{
if (impl.finish_ident)
impl.finish_ident(impl.handle);
}