Change dstr_init_strref to dstr_init_copy_strref
This commit is contained in:
parent
7de8981365
commit
52c0d223fd
@ -955,7 +955,7 @@ static bool cf_preprocessor(struct cf_preprocessor *pp,
|
||||
strref_cmp(&cur_token->str, "endif") == 0) {
|
||||
if (!if_block) {
|
||||
struct dstr name;
|
||||
dstr_init_strref(&name, &cur_token->str);
|
||||
dstr_init_copy_strref(&name, &cur_token->str);
|
||||
cf_adderror(pp, cur_token,"#$1 outside of "
|
||||
"#if/#ifdef/#ifndef block",
|
||||
name.array, NULL, NULL);
|
||||
@ -1285,7 +1285,7 @@ void cf_preprocessor_add_def(struct cf_preprocessor *pp, struct cf_def *def)
|
||||
|
||||
if (existing) {
|
||||
struct dstr name;
|
||||
dstr_init_strref(&name, &def->name.str);
|
||||
dstr_init_copy_strref(&name, &def->name.str);
|
||||
cf_addwarning(pp, &def->name, "Token $1 already defined",
|
||||
name.array, NULL, NULL);
|
||||
cf_addwarning(pp, &existing->name,
|
||||
|
@ -284,7 +284,7 @@ void strlist_free(char **strlist)
|
||||
}
|
||||
}
|
||||
|
||||
void dstr_init_strref(struct dstr *dst, const struct strref *src)
|
||||
void dstr_init_copy_strref(struct dstr *dst, const struct strref *src)
|
||||
{
|
||||
dstr_init(dst);
|
||||
dstr_copy_strref(dst, src);
|
||||
|
@ -60,7 +60,7 @@ static inline void dstr_init_move_array(struct dstr *dst, char *str);
|
||||
static inline void dstr_init_copy(struct dstr *dst, const char *src);
|
||||
static inline void dstr_init_copy_dstr(struct dstr *dst,
|
||||
const struct dstr *src);
|
||||
EXPORT void dstr_init_strref(struct dstr *dst, const struct strref *src);
|
||||
EXPORT void dstr_init_copy_strref(struct dstr *dst, const struct strref *src);
|
||||
|
||||
static inline void dstr_free(struct dstr *dst);
|
||||
static inline void dstr_array_free(struct dstr *array, const size_t count);
|
||||
|
Loading…
x
Reference in New Issue
Block a user