another attempt to port the robust parser to MacOS

This commit is contained in:
kr.angelov
2012-05-16 15:18:44 +00:00
parent 6f328c9040
commit f4c17cb7aa
15 changed files with 21 additions and 32 deletions

View File

@@ -171,7 +171,7 @@ gu_malloc_init(GuPool* pool, size_t size, const void* init)
#ifdef GU_HAVE_STATEMENT_EXPRESSIONS
#ifdef HAVE_STATEMENT_EXPRESSIONS
#define gu_new_i(pool, type, ...) \
({ \
type *gu_new_p_ = gu_new(type, pool); \
@@ -179,12 +179,12 @@ gu_malloc_init(GuPool* pool, size_t size, const void* init)
sizeof(type)); \
gu_new_p_; \
})
#else // GU_HAVE_STATEMENT_EXPRESSIONS
#else // HAVE_STATEMENT_EXPRESSIONS
#define gu_new_i(pool, type, ...) \
((type*)gu_malloc_init_aligned((pool), sizeof(type), \
gu_alignof(type), \
&(type){ __VA_ARGS__ }))
#endif // GU_HAVE_STATEMENT_EXPRESSIONS
#endif // HAVE_STATEMENT_EXPRESSIONS
/** @def gu_new_i(pool, type, ...)
*