2 * Copyright 2012 Ecole Normale Superieure
4 * Use of this software is governed by the MIT license
6 * Written by Sven Verdoolaege,
7 * Ecole Normale Superieure, 45 rue d'Ulm, 75230 Paris, France
10 #define xCAT(A,B) A ## B
11 #define CAT(A,B) xCAT(A,B)
13 #define TYPE CAT(isl_,BASE)
14 #define xFN(TYPE,NAME) TYPE ## _ ## NAME
15 #define FN(TYPE,NAME) xFN(TYPE,NAME)
17 /* Is "obj" obviously equal to the object represented by "str"?
19 static isl_bool
FN(BASE
,plain_is_equal
)(__isl_keep TYPE
*obj
, const char *str
)
26 return isl_bool_error
;
28 ctx
= FN(TYPE
,get_ctx
)(obj
);
29 obj2
= FN(TYPE
,read_from_str
)(ctx
, str
);
30 equal
= FN(TYPE
,plain_is_equal
)(obj
, obj2
);
36 /* Check that "obj" is obviously equal to the object represented by "str".
38 static isl_stat
FN(BASE
,check_plain_equal
)(__isl_keep TYPE
*obj
,
43 equal
= FN(BASE
,plain_is_equal
)(obj
, str
);
45 return isl_stat_error
;
47 isl_die(FN(TYPE
,get_ctx
)(obj
), isl_error_unknown
,
48 "result not as expected", return isl_stat_error
);