The problem is that the const is carried to an internal array here: char const *array; /*in*/
... but then in the loop that copies input ML to C, const prevents this assignment: array[_c2] = Int_val(_v3);
Now, the usefulness of const on an interface .h is debatable... regardless, it's really not clear why CamlIDL breaks here, from a user perspective. Simply removing const from the internal array within the function leads to code that does compile properly. Or, change the documentation to note this : )
Using this sample test IDL:
generates code that does not compile:
The problem is that the
const
is carried to an internal array here:char const *array; /*in*/
... but then in the loop that copies input ML to C,const
prevents this assignment:array[_c2] = Int_val(_v3);
Now, the usefulness of
const
on an interface .h is debatable... regardless, it's really not clear why CamlIDL breaks here, from a user perspective. Simply removingconst
from the internal array within the function leads to code that does compile properly. Or, change the documentation to note this : )