这篇教程C++ type_alloc函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中type_alloc函数的典型用法代码示例。如果您正苦于以下问题:C++ type_alloc函数的具体用法?C++ type_alloc怎么用?C++ type_alloc使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了type_alloc函数的25个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: asserttype *type_fake(tym_t ty){ type *t;#if MARS assert(ty != TYstruct);#endif t = type_alloc(ty); if (typtr(ty) || tyfunc(ty)) { t->Tnext = type_alloc(TYvoid); /* fake with pointer to void */ t->Tnext->Tcount = 1; } return t;}
开发者ID:sgraf812,项目名称:dmd,代码行数:13,
示例2: symbol_calloc/************************************** * Create a struct/union/class type. * Params: * name = name of struct (this function makes its own copy of the string) * Returns: * Tcount already incremented */type *type_struct_class(const char *name, unsigned alignsize, unsigned structsize, type *arg1type, type *arg2type, bool isUnion, bool isClass, bool isPOD){ Symbol *s = symbol_calloc(name); s->Sclass = SCstruct; s->Sstruct = struct_calloc(); s->Sstruct->Salignsize = alignsize; s->Sstruct->Sstructalign = alignsize; s->Sstruct->Sstructsize = structsize; s->Sstruct->Sarg1type = arg1type; s->Sstruct->Sarg2type = arg2type; if (!isPOD) s->Sstruct->Sflags |= STRnotpod; if (isUnion) s->Sstruct->Sflags |= STRunion; if (isClass) { s->Sstruct->Sflags |= STRclass; assert(!isUnion && isPOD); } type *t = type_alloc(TYstruct); t->Ttag = (Classsym *)s; // structure tag name t->Tcount++; s->Stype = t; t->Tcount++; return t;}
开发者ID:marler8997,项目名称:dmd,代码行数:35,
示例3: allocaSymbol *Dsymbol::toImport(Symbol *sym){ char *id; char *n; Symbol *s; type *t; //printf("Dsymbol::toImport('%s')/n", sym->Sident); n = sym->Sident; id = (char *) alloca(6 + strlen(n) + 1 + sizeof(type_paramsize(sym->Stype))*3 + 1); if (sym->Stype->Tmangle == mTYman_std && tyfunc(sym->Stype->Tty)) { if (config.exe == EX_WIN64) sprintf(id,"__imp_%s",n); else sprintf(id,"_imp__%[email C++ type_check函数代码示例 C++ typeToString函数代码示例
|