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.


  1. 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.
  2. For the paranoid, or for potentially misbehaving legacy code, constant versions or copies could be returned.
  3. This topic will need further attention when implementing perl wrappers.