On Fri, 8 Apr 2011 15:29:48 +0300 Laurynas Biveinis <laurynas.bivei...@gmail.com> wrote:
> > 2011-04-08 Basile Starynkevitch <bas...@starynkevitch.net> > > * gengtype.c (write_typed_alloc_def): New argument f. Use it instead > > of header_file. > > (write_typed_struct_alloc_def, write_typed_typedef_alloc_def) > > (write_typed_alloc_defns): Likewise. > > (main): Calls write_typed_alloc_defns with output_header. > > The patch is OK. Thanks, Committed revision 172203 (on trunk). Actually, the above committed patch is better than nothing, but not perfect. It happens to generate ggc_alloc macros for things which are not defined in the plugin (however, this is not a big deal in practice, since it generates some macros in common with those inside gtype-desc.h). I have no clear idea on how to improve it. We could for instance write the ggc_alloc macros only for struct & typedefs defined in the plugin files. We then would need a way to know if a file is a plugin file or not. What do you think? We might also want to generate the ggc_alloc macros in a header file (for the plugin) different of the one containing the marking routines. Cheers -- Basile STARYNKEVITCH http://starynkevitch.net/Basile/ email: basile<at>starynkevitch<dot>net mobile: +33 6 8501 2359 8, rue de la Faiencerie, 92340 Bourg La Reine, France *** opinions {are only mine, sont seulement les miennes} ***