char *Initializer::toChars() { HdrGenState hgs; OutBuffer buf; toCBuffer(&buf, &hgs); return buf.extractString(); }
char *Initializer::toChars() { OutBuffer *buf; HdrGenState hgs; memset(&hgs, 0, sizeof(hgs)); buf = new OutBuffer(); toCBuffer(buf, &hgs); return buf->toChars(); }
char *Initializer::toChars() { HdrGenState hgs; OutBuffer buf; toCBuffer(&buf, &hgs); buf.writebyte(0); return buf.extractData(); }
void Module::genhdrfile() { OutBuffer hdrbufr; hdrbufr.doindent = 1; hdrbufr.printf("// D import file generated from '%s'", srcfile->toChars()); hdrbufr.writenl(); HdrGenState hgs; memset(&hgs, 0, sizeof(hgs)); hgs.hdrgen = 1; toCBuffer(&hdrbufr, &hgs); // Transfer image to file hdrfile->setbuffer(hdrbufr.data, hdrbufr.offset); hdrbufr.data = NULL; ensurePathToNameExists(Loc(), hdrfile->toChars()); writeFile(loc, hdrfile); }
void Module::genhdrfile() { OutBuffer hdrbufr; hdrbufr.printf("// D import file generated from '%s'", srcfile->toChars()); hdrbufr.writenl(); HdrGenState hgs; memset(&hgs, 0, sizeof(hgs)); hgs.hdrgen = 1; toCBuffer(&hdrbufr, &hgs); // Transfer image to file hdrfile->setbuffer(hdrbufr.data, hdrbufr.offset); hdrbufr.data = NULL; char *pt = FileName::path(hdrfile->toChars()); if (*pt) FileName::ensurePathExists(pt); mem.free(pt); hdrfile->writev(); }
void Dsymbol::toHBuffer(OutBuffer *buf, HdrGenState *hgs) { toCBuffer(buf, hgs); }