externals questions

Alex Rice alrice at ARCplanning.com
Thu Jun 19 11:03:00 EDT 2003


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.

Alex Rice, Software Developer
Architectural Research Consultants, Inc.
alrice at ARCplanning.com
alrice at swcp.com






More information about the use-livecode mailing list