This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 2/7] [python] API for macros: memory management quirks.


>>>>> "matt" == matt rice <ratmice@gmail.com> writes:

matt> 2011-08-23  Matt Rice  <ratmice@gmail.com
matt> 	* dwarf2read.c (macro_start_file): Update args in call to
matt> 	new_macro_table.
matt> 	* macroscope.c (_initialize_macroscope): Ditto.
matt> 	* macrotab.c (struct macro_table): Remove obstack and bcache,
matt> 	add objfile.
matt> 	(macro_alloc): Replace obstack and bcache usage with those from
matt> 	the objfile.
matt> 	(macro_free, macro_bcache_free, macro_allow_redefinitions): Ditto
matt> 	(macro_bcache, new_macro_table): Ditto, and add assertions.
matt> 	(macro_table_objfile): New function.
matt> 	* macrotab.h: Replace forward declarations of bcache and obstack
matt> 	with objfile.
matt> 	(enum macro_table_type, macro_table_objfile): Add.

A couple minor nits on this one.

matt> +new_macro_table (struct objfile *objfile, enum macro_table_type table_type)

I don't think we need the new enum or the second argument here.
Checking whether OBJFILE==NULL is good enough.

matt> +struct objfile * macro_table_objfile (struct macro_table *table);

No space after the *.

Ok with these changes, contingent on the whole series being ok'd.

Tom


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]