[
https://issues.apache.org/jira/browse/AXIS2C-1015?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12573406#action_12573406
]
senakafdo edited comment on AXIS2C-1015 at 2/28/08 11:12 AM:
-------------------------------------------------------------------
Hi Bill,
Well it seems that we should rather append the const prefix to the return type,
as you say. But, what if someone has already made it a point to modify the
returned value? Well, I believe that these could rather be documented for the
moment.
The right thing would be to use the const keyword, but, would that lead to a
change in API? Might it lead to build breaks etc.? Therefore, I'm not having a
clear picture of what should be done.
I'm not so sure what could a modification to a reference, cause to the object
in concern, but, in the case of the URI, we'll be stumped, if someone modifies
a reference. Because all those validations, at the point of parsing are going
to be useless.
Regards,
Senaka
was (Author: senakafdo):
Hi Bill,
Well it seems that we should rather append the const prefix to the return type,
as you say. But, what if someone has already made it a point to modify the
returned value? Well, I believe that these could rather be documented for the
moment.
The right thing would be to use the const keyword, but, would that lead to a
change in API? I'm not having a clear picture of what should be done.
I'm not so sure what could a modification to a reference, cause to the object
in concern, but, in the case of the URI, we'll be stumped, if someone modifies
a reference. Because all those validations, at the point of parsing are going
to be useless.
Regards,
Senaka
> 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]