Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 4.0

...

  1. An API which allocates memory will either return a good pointer, or not return at all. There are no such things as TS_ERROR_PTR.
  2. An API which returns a pointer to data is allowed to either return a good pointer, or a NULL pointer. No special pointers are ever returned.
  3. If the success or failure of an API can not be returned with a simple value (e.g. NULL pointer or not), then it should return TSReturnCode.
  4. TS_ERROR will never be used as a return value for anything returning an integer type. Meaning, only TSReturnCode can return TS_ERROR or TS_SUCCESS.
  5. Bad input (or output) parameters will always generate an ink_api_assert(), which by default will trigger on both release and debug builds.

...