On 9/12/12, Ian Lance Taylor <i...@google.com> wrote:
> On Sep 11, 2012 Lawrence Crowl <cr...@googlers.com> wrote:
> > On 9/11/12, Ian Lance Taylor <i...@google.com> wrote:
> > > This patch is the interface to and configury of libbacktrace.
> > > I've separated these out as the parts of libbacktrace that
> > > require the most review.  The interface to libbacktrace is in
> > > the file backtrace.h.  This is what callers will use.  The file
> > > backtrace-supported.h is also available so that programs can
> > > see whether calling the backtrace library will work at all.
> >
> > The interface relies on global data in the library.  Wouldn't it
> > be better to expose the state as an additional parameter to
> > enable concurrent access by different threads?  That parameter
> > could then be modeled as 'this' parameter, addressing Gaby's
> > suggesting.
>
> I went ahead and added a state parameter to the interface.
> I've attached the updated patch.

How about typing it as a pointer to an incomplete struct?

extern void *backtrace_create_state (...

becomes, e.g.,

struct backtrace_state;
extern backtrace_state *backtrace_create_state (...

-- 
Lawrence Crowl

Reply via email to