mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-04-29 06:30:39 +03:00
Revise recent adaptations to frontend refactorings
This commit is contained in:
parent
a3efe6d89c
commit
1f5c442519
10 changed files with 76 additions and 93 deletions
|
@ -28,8 +28,11 @@ bool parseStringExp(Expression *e, const char *&res) {
|
|||
if (e->op != TOKstring) {
|
||||
return false;
|
||||
}
|
||||
auto s = static_cast<StringExp *>(e);
|
||||
res = s->toStringz();
|
||||
auto se = static_cast<StringExp *>(e);
|
||||
auto size = (se->len + 1) * se->sz;
|
||||
auto s = static_cast<char *>(mem.xmalloc(size));
|
||||
se->writeTo(s, true);
|
||||
res = s;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue