pdf-devel
[Top][All Lists]
Advanced

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

Re: [pdf-devel] type 3 functions


From: jemarch
Subject: Re: [pdf-devel] type 3 functions
Date: Mon, 24 Sep 2007 16:06:31 +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)

Hello.

   The occurence of function objects in a type 3 function 
   dictionary makes pdf_func_t into a recursive data type.
   How is such an pdf_ obj_t constructed in the first place? 

The constructors for the several object types always takes non-object
arguments (the stream is an exception, and makes a copy of the
dict object):

pdf_obj_t pdf_create_null (void);
pdf_obj_t pdf_create_boolean (int value);
pdf_obj_t pdf_create_integer (int value);
pdf_obj_t pdf_create_real (float value);
pdf_obj_t pdf_create_string (unsigned char *value, int size);
pdf_obj_t pdf_create_name (unsigned char *value, int size);
pdf_obj_t pdf_create_array (void);
pdf_obj_t pdf_create_dict (void);
pdf_obj_t pdf_create_indirect (unsigned int on, unsigned int gn);
pdf_obj_t pdf_create_stream (pdf_obj_t dict, pdf_stm_t stm,
                             pdf_stm_pos_t data);

The constructor of the stream object could be changed to share the
same dictionary object with the caller.

Then, objects able to contain another objects (namely arrays and
dictionaries) are created empty. The functions that adds elements to
arrays and dictionaries do not make a copy of the inserted objects.

   Afaik, pdf_obj_t constructors make deep copies of their 
   arguments. 

Only for strings and names. I will change it in my next cvs commit.

--
Jose E. Marchesi  <address@hidden>
                  <address@hidden>

GNU Spain         http://es.gnu.org
GNU Project       http://www.gnu.org






reply via email to

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