brintos

brintos / llvm-project-archived public Read only

0
0
Text · 664 B · 51fa8ed Raw
28 lines · c
1/*2 * Copyright 2008      Katholieke Universiteit Leuven3 *4 * Use of this software is governed by the MIT license5 *6 * Written by Sven Verdoolaege, K.U.Leuven, Departement7 * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium8 */9 10#define xCAT(A,B) A ## B11#define CAT(A,B) xCAT(A,B)12#undef TYPE13#define TYPE CAT(isl_,TYPE_BASE)14 15/* Read an object of type TYPE from "str" (using an isl_stream).16 */17__isl_give TYPE *FN(isl,FN(TYPE_BASE,read_from_str))(isl_ctx *ctx,18	const char *str)19{20	TYPE *obj;21	isl_stream *s = isl_stream_new_str(ctx, str);22	if (!s)23		return NULL;24	obj = FN(isl_stream_read,TYPE_BASE)(s);25	isl_stream_free(s);26	return obj;27}28