The following routines in Tcl's public interface, tcl.h, make use of the mp_int type:
Tcl's public header, tcl.h also includes these declarations:
#ifndef MP_INT_DECLARED typedef struct mp_int mp_int; #define MP_INT_DECLARED #endif #ifndef MP_DIGIT_DECLARED typedef unsigned long mp_digit; #define MP_DIGIT_DECLARED #endif
which allows the compiler to make sense of the function declarations.
Callers of those functions must be able to allocate an mp_int struct so they can pass its address in. In order to do this a definition of the mp_int struct has to be in scope, but Tcl's public header tcl.h does not provide one.
Q1: What header file are callers of these routines expected to #include to get a suitable mp_int definition in scope?
Q2: If the answer is something other than a corrected tcl.h, how are we to verify that the mp_digit definition active wherever that definition comes from is the same as that in tcl.h? ( Failure to make them consistent leads to a binary incompatibility).
more to come...