pdf-devel
[Top][All Lists]
Advanced

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

Re: [pdf-devel] Assigning a 64-bit value to pdf_i64_t


From: jemarch
Subject: Re: [pdf-devel] Assigning a 64-bit value to pdf_i64_t
Date: Sun, 22 Feb 2009 19:25:56 +0100
User-agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (Shijō) APEL/10.6 Emacs/23.0.60 (i686-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO)

Hi Aleks.

   We have a function that can be used to initialize a pdf_i64_t with a 
   pdf_i32_t:

   void
   pdf_i64_assign_quick (pdf_i64_t *bignum,
                          const pdf_i32_t value,
                          pdf_status_t *p_status);

   But, what if I am in a OS with built-in 64-bit support (like I guess we 
   all are) and I want to assign a 64-bit value (coming from system 
   functions for example) into a pdf_i64_t?

   Well, we can also use `pdf_i64_assign_quick' for that, as in those types 
   of OS that function will just be a macro, which doesn't take care of 
   type sizes. Note that we can't use "=" for that, as it would break our 
   built-in 64-bit support.

   But, I don't think it's clear from the API document point of view, as it 
   seems that only 32-bit integers are allowed. How can we explain this in 
   the document? Just with a note saying... "hey, you can also use a 64-bit 
   value in this function instead of a pdf_i32_t"... or what?

I just added a note about this to the documentation of
'pdf_i64_assign_quick', but it still may be confusing.

Maybe the use of those macros was not a good idea after all. The most
I think about it the most I am sure we should let the user to check
for the availability of 64bit numbers and then explicitly use the
scalar type or the bignums implementation...

-- 
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]