Re: [gmime-devel] GMime 2.99 - no more global variables



On Tue 2017-02-07 18:29:51 -0500, Jeffrey Stedfast wrote:
On 2/7/2017 2:22 PM, Daniel Kahn Gillmor wrote:
On Tue 2017-02-07 10:07:33 -0500, Jeffrey Stedfast wrote:

This is just a status update. At this point, I've gotten GMime to the point
where there are no longer any global variables.
thank you for this!

1. g_mime_init() no longer takes a flags argument.
Is it possible that we don't need g_mime_init() at all any longer?

Still need it for internal iconv caches

Presumably the iconv caches could be managed by a "gmime context"
object, if you follow the library context object model proposed by
libabc.  that's fine if you don't want to do it, just thought i'd raise
it as a common pattern to consider.

and also to initialize glib's type system.

i'm not as sure about this one, unfortunately, but if a dependency has
an idempotent initialization action, you could certainly invoke it when
creating a new "gmime context" object.

anyway, just floating the model -- if it doesn't match your vision of
where gmime is going that's also fine. :)

      --dkg


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