|
EMBOSS: C2 Functions Returning Objects
|
Although the EMBOSS coding standards say that no functions should
return a non-const pointer to internal data this does not seem to be
practical.
Issues:
- Is it reasonable to return, for example, "char*" to
point to the character part of an AJAX string and specify that the
caller must not change it? The aim is to avoid unnecessary duplication
of data, and to avoid problems passing constant data to functions with
non-const prototypes.
- For the paranoid, or for potentially misbehaving legacy code,
constant versions or copies could be returned.
- This topic will need further attention when implementing
perl wrappers.