You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@axis.apache.org by Samisa Abeysinghe <sa...@gmail.com> on 2005/10/10 18:21:38 UTC

[Axis2] Function Parameters and Return Value Conventions

Hi All,

    I wrote down how we should be using environment struct as a 
parameter and the way we should be returning values.

    Comments please...

Each function should be passed a pointer to an instance of 
axis2_environment_t struct as the first parameter. If the function is 
tightly bound to a struct, the second parameter is a pointer to an 
instance of that struct.

Functions returning pointers should return NULL in case of an error. The 
developer should make sure to set the relavant error code in 
environment's error struct.

Functions returning non pointer values should always return 
AXIS2_FAILURE status code on error whenever possible, or some defined 
error value (in case of returning a struct may be). A relavant error 
code must also be set in environment's error struct.

Thanks,
Samisa...