Make the string type elements "immutable", akin to char const * in C

Allows for extra security and optimization benefits
This commit is contained in:
gingerBill
2019-12-01 14:10:59 +00:00
parent 7fbe0a6f23
commit 9db81498d8
25 changed files with 255 additions and 176 deletions

View File

@@ -619,7 +619,7 @@ AstPackage *get_core_package(CheckerInfo *info, String name) {
}
void add_package_dependency(CheckerContext *c, char *package_name, char *name) {
void add_package_dependency(CheckerContext *c, char const *package_name, char const *name) {
String n = make_string_c(name);
AstPackage *p = get_core_package(&c->checker->info, make_string_c(package_name));
Entity *e = scope_lookup(p->scope, n);