Remove TODO to allow const variable names

I made it possible for variable names to be const strings, only to discover
this actually used *more* heap memory instead of less. Also only very low
performance gains. So let's not do that and keep things a bit simpler.
This commit is contained in:
Laria 2023-02-10 20:37:47 +01:00
parent 09f5cef085
commit 0b44878fcd

View file

@ -830,9 +830,6 @@ init_globals(apfl_ctx ctx)
goto error;
}
// TODO: It's silly that we need to copy the name into a new gc string.
// It should be possible for the scope to also have a const string
// as a name.
struct apfl_string *name = new_copied_string(gc, apfl_string_view_from(global->name));
if (name == NULL) {
goto error;