externals questions
Shao Sean
shaosean at unitz.ca
Thu Jun 19 11:22:00 EDT 2003
i'd love to have more information regarding writing
externals for MC/RR, as i'm basically just copying what's in
the example without knowing why (i should also mention that
i know more about accounting than i do about c/c++)
----- Original Message Follows -----
> In the Game of Life external, external.c, I have noticed:
>
> 1) String constants are copied before returning, e.g.
> *retstring = istrdup("atan2: must pass 2 arguments");
> Why is this? It seems to work just as well todo
> *retstring = "here is the return value";
>
> 2) To indicate a successful call to a handler, it is doing
> *retstring = (char *)calloc(1, 1);
> What is the significance of the 1 byte? It seems returning
> NULL works just as well and it's one less function call
> to make.
More information about the use-livecode
mailing list