Exemplo n.º 1
0
static void ResultSet_InitColumn(KonohaContext *kctx, kResultSet *rs, unsigned column_size)
{
	rs->column_size = column_size;
	if(rs->column_size > 0) {
		rs->column = KMalloc_UNTRACE(sizeof(KColumn) * rs->column_size);
	}
}
Exemplo n.º 2
0
static void DumpVisitor_init(KonohaContext *kctx, struct IRBuilder *builder, kMethod *mtd)
{
	unsigned i;
	KGrowingBuffer wb;
	KLIB Kwb_init(&(kctx->stack->cwb), &wb);
	kParam *pa = Method_param(mtd);
	KLIB Kwb_printf(kctx, &wb, "METHOD %s%s(", T_mn(mtd->mn));
	for (i = 0; i < pa->psize; i++) {
		if(i != 0) {
			KLIB Kwb_write(kctx, &wb, ", ", 2);
		}
		KLIB Kwb_printf(kctx, &wb, "%s %s", TY_t(pa->paramtypeItems[i].ty), SYM_t(pa->paramtypeItems[i].fn));
	}
	emit_string(KLIB Kwb_top(kctx, &wb, 1), "", ") {", 0);
	builder->local_fields = (void *) KMalloc_UNTRACE(sizeof(int));
	DUMPER(builder)->indent = 0;
}
Exemplo n.º 3
0
static kregexp_t* pcre_regmalloc(KonohaContext *kctx, kString* s)
{
	PCRE_regexp_t *preg = (PCRE_regexp_t *) KMalloc_UNTRACE(sizeof(PCRE_regexp_t));
	return (kregexp_t *) preg;
}
Exemplo n.º 4
0
/* ------------------------------------------------------------------------ */
static kMPIRequest *newMPIRequest(KonohaContext *kctx) {
	kMPIRequest* p = (kMPIRequest *)KMalloc_UNTRACE(sizeof(kMPIRequest));
	return p;
}
Exemplo n.º 5
0
static kMPIData *newMPIData(KonohaContext *kctx) {
	kMPIData* p = (kMPIData *)KMalloc_UNTRACE(sizeof(kMPIData));
	return p;
}