Currently, xpidl maps an array of strings to "const char **" (for an "in"
parameter) in C++. But this prevents me from passing a "char **" or a "const
char * const *" as the "in" parameter when calling the method.
Wouldn't it be better if arrays of strings were mapped to "const char *
const *" (for "in" parameters) in C++? This would allow passing "char **",
"const char **" or a "const char * const *" as the in parameter and would
prevent the method implementation from modifying the array without
explicitely casting away the const.
Here is an example:
// IDL file:
[ uuid(f790ad9b-16b8-46ee-97ef-3474a9506f03) ]
interface ITest
{
void f([array, size_is(s_length)] in string s, in unsigned long s_length);
};
// generated method signature
NS_IMETHOD F(const char **s, PRUint32 s_length) = 0;
// should be: NS_IMETHOD F(const char *const *s, PRUint32 s_length) = 0;
BTW, I think the mapping of arrays of interfaces (for "in" parameters"
should also be changed accordingly (from "ITest **" to "ITest *const *")
bye, Christof
--
http://cmeerw.cjb.net JID: [EMAIL PROTECTED]
mailto cmeerw at web.de
...and what have you contributed to the Net?