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 "Bill Mitchell (JIRA)" <ji...@apache.org> on 2008/02/28 18:11:51 UTC

[jira] Commented: (AXIS2C-1015) In axutil_uri, a reference is returned, where a duplicated string should be.

    [ https://issues.apache.org/jira/browse/AXIS2C-1015?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12573357#action_12573357 ] 

Bill Mitchell commented on AXIS2C-1015:
---------------------------------------

Although I've not researched exactly how the axutil_uri_get_xxx accessors are used, it appears that generally throughout Axis2C the _get_ accessors return axis2_char_t * or similar references without a const declaration, and with no intention of allowing the caller to modify the indicated string.  Consider, for example, axiom_namespace_get_prefix in axiom_namespace.h.  Changing every such interface to return a duplicate will introduce a lot of overhead and will mean that the callers must take ownership and free the associated memory.  It would be better to perform a general overhaul of the interfaces to add const to the declarations, although such a change, too, will naturally propagate throughout the callers' code as well.

> In axutil_uri, a reference is returned, where a duplicated string should be.
> ----------------------------------------------------------------------------
>
>                 Key: AXIS2C-1015
>                 URL: https://issues.apache.org/jira/browse/AXIS2C-1015
>             Project: Axis2-C
>          Issue Type: Bug
>          Components: util
>    Affects Versions: 1.3.0
>            Reporter: Senaka Fernando
>            Assignee: Senaka Fernando
>
> In axutil_uri, a reference is returned, where a duplicated string should be. This is because we return axis2_char_t * rather than const axis2_char_t *. However, a user is expected to be able modify what is returned, according to current api, and thus we must return a cloned copy of the actual string.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-dev-help@ws.apache.org