fixed builder_cancel macro to return NULL on failed build

This commit is contained in:
Martin Willi
2008-10-06 13:08:49 +00:00
parent aa1b90a5b2
commit 0592212f23
2 changed files with 15 additions and 1 deletions
+6 -1
View File
@@ -118,6 +118,11 @@ struct builder_t {
* Helper macro to cancel a build in a builder
*/
#define builder_cancel(builder) { (builder)->add = (void*)nop; \
(builder)->build = (void*)free; }
(builder)->build = (void*)builder_free; }
/**
* Helper function for a cancelled build.
*/
void* builder_free(builder_t *this);
#endif /* BUILDER_H_ @}*/