[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[pdf-devel] Preallocated PDF names and library initialization
From: |
jemarch |
Subject: |
[pdf-devel] Preallocated PDF names and library initialization |
Date: |
Fri, 14 Sep 2007 23:33:10 +0200 |
User-agent: |
Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (Shijō) APEL/10.6 Emacs/22.1.50 (powerpc-unknown-linux-gnu) MULE/5.0 (SAKAKI) |
Hi.
I just commited the support for preallocated PDF names.
In order to access to a pdf_obj containing a preallocated PDF name you
should use the PDF_N_* macros in `pdf_base.h':
PDF_N_ENCODE (for the name containing "Encode")
PDF_N_COLOR_TRANSFORM (for the name containing "ColorTransform")
etc
for example:
get_name_data (PDF_N_ENCODE)
The preallocated objects are in a global variable of type
`pdf_globals_t'. The data type is defined in `pdf.h' and the variable
(named `pdf_globals') is defined in `pdf.c'.
If you want to use any data in `pdf_global' (or to use the PDF_N_*
macros) in your library module, just call the PDF_GLOBALS macro
defined in `pdf_base.h'. See `torture/test-libinit.c' for an example.
There are two new functions in `pdf.c':
pdf_init ()
pdf_finish ()
It is expected for clients to call `pdf_init' before any usage of the
library, and to call `pdf_finish' to free all the resources allocated
by the library.
--
Jose E. Marchesi <address@hidden>
<address@hidden>
GNU Spain http://es.gnu.org
GNU Project http://www.gnu.org
- [pdf-devel] Preallocated PDF names and library initialization,
jemarch <=