Details
-
Improvement
-
Status: Resolved
-
Major
-
Resolution: Won't Fix
-
1.6.0
-
None
-
None
Description
axutil_string_create_const() has a strange signature:
/**
- Creates a string struct.
- @param str pointer to string. string struct would not create a duplicate
- of this and assumes the str would have longer life than that of itself
- @param env pointer to environment struct
- @return a pointer to newly created string struct
*/
AXIS2_EXTERN axutil_string_t *AXIS2_CALL
axutil_string_create_const(
const axutil_env_t * env,
axis2_char_t ** str);
Why "** str" and not "* str" ?
I expected to be able to do:
axutil_string_t *soap_action = axutil_string_create_const(env, "MySoapAction");
Instead I have to do:
const axis2_char_t * MySoapAction = "MySoapAction"
axutil_string_t *soap_action = axutil_string_create_const(env, &MySoapAction);
This is crazy !
Same problem for axutil_string_create_assume_ownership().