pdf-devel
[Top][All Lists]
Advanced

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

Re: [pdf-devel] libcurl initialization requirements


From: jemarch
Subject: Re: [pdf-devel] libcurl initialization requirements
Date: Wed, 17 Feb 2010 20:52:17 +0100
User-agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (Shijō) APEL/10.6 Emacs/23.1.91 (i686-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO)

   We already have that requirement in some base-layer modules, like
   the text module or time module. The text module has a
   pdf_text_context_init() which should be called once at program
   startup, preferably when no other threads are running (so that no
   other thread actually tries to call it).

We should not introduce that requirement!  If pdf_init() is supposed
to be called only once in the lifetime of the application then we
should provide the user a way to determine if it has been called
before in an atomic way.

A possible way to achieve that could be:

   
   /* Global symbol indicating if libgnupdf has been initialized:  */
   bool pdf_initialized = false;

  
   pdf_init()
   {

    ...

    /* Declare the library initialized.  */
    pdf_initialized = true;
   }

--
Jose E. Marchesi  <address@hidden>
                  http://www.jemarch.net
GNU Project       http://www.gnu.org

  





reply via email to

[Prev in Thread] Current Thread [Next in Thread]