Re: On the cost of libraries



On 01Sep2001 03:58PM (-0700), Darin Adler wrote:
> on 9/1/01 3:48 PM, Havoc Pennington at hp redhat com wrote:
> 
> > See GTK - use libtool:
> > 
> > # libtool option to control which symbols are exported
> > # right now, symbols starting with _ are not exported
> > LIBTOOL_EXPORT_OPTIONS='-export-symbols-regex "^[[^_]].*"'
> > AC_SUBST(LIBTOOL_EXPORT_OPTIONS)
> > 
> > We make private symbols start with _, but if you didn't want to do
> > that you can also have a file where you make a list of private
> > symbols. libtool just uses the regexp to generate the file.
> 
> My own personal taste would be to generate the list of symbols to export
> from a simple-minded "parse" of the public headers and make everything else
> private. It seems like it might be straightforward to come up with a way to
> do this that could be reused in various libraries.
> 

I really like this idea. I like it better than the underscore prefix
convention, especially given the fact that symbols with leading
underscores are in theory reserved to the C implementation.

 - Maciej

_______________________________________________
gnome-hackers mailing list
gnome-hackers gnome org
http://mail.gnome.org/mailman/listinfo/gnome-hackers




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]