Yep, due to the error report they are not fully compatible (the macros
don't return a pdf_status_t as the functions do).
What about forgetting the errors in the 64bit module and set all
functions returning void?
Errors can happens in the pdf-64t code, so we definitely dont want to
ignore the error conditions.
Maybe we could use one of the values of the 64bit integers (such as
the larger one) and to recognize an error condition when that special
value is found in a result.
So:
pdf_i64_add(&bignum1, bignum2, bignum3);
if (pdf_i64_invalid_p(bignum1))
{
/* An error occurred */
}
As talked in the irc, could be better to pass a reference to the status
variable to the function so that it can safely return void:
void
pdf_i64_sum(pdf_i64_t *result,
pdf_i64_t num1,
pdf_i64_t num2,
pdf_status_t *p_status)
In this way, the macros will directly place PDF_OK in *p_status.
Then we can check the status value to see if the operation went ok or not.