Mercurial > MadButterfly
diff tools/mb_c_header.m4 @ 67:3f2872a1a2fe
clear objects in *_free() for generated code
author | Thinker K.F. Li <thinker@branda.to> |
---|---|
date | Wed, 13 Aug 2008 08:05:50 +0800 |
parents | c668c5c3ceae |
children | a6150b4e0667 |
line wrap: on
line diff
--- a/tools/mb_c_header.m4 Wed Aug 13 02:17:19 2008 +0800 +++ b/tools/mb_c_header.m4 Wed Aug 13 08:05:50 2008 +0800 @@ -31,15 +31,18 @@ define([MADBUTTERFLY],[dnl [#ifndef __$1_H_ -#define __$1_H_] +#define __$1_H_ -[typedef struct $1 $1_t;] +typedef struct $1 $1_t; -struct [$1] { - coord_t *root_coord; +struct $1 { + coord_t *root_coord;] $2[]dnl -}; +[}; -[#endif /* __$1_H_ */] +extern $1_t *$1_new(redraw_mant_t *rdman); +extern void $1_free($1_t *obj); + +#endif /* __$1_H_ */] ]) divert[]dnl