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 (JIRA)" <ji...@apache.org> on 2006/12/20 10:52:21 UTC

[jira] Commented: (AXIS2C-474) Use pointer plus length instead of nul-terminated string for text content

    [ http://issues.apache.org/jira/browse/AXIS2C-474?page=comments#action_12459873 ] 
            
Samisa Abeysinghe commented on AXIS2C-474:
------------------------------------------

I guess the advantage is the reduced number of calls to strlen. Is there any other rationale for your suggestion. 



> Use pointer plus length instead of nul-terminated string for text content
> -------------------------------------------------------------------------
>
>                 Key: AXIS2C-474
>                 URL: http://issues.apache.org/jira/browse/AXIS2C-474
>             Project: Axis2-C
>          Issue Type: Improvement
>          Components: xml/om
>    Affects Versions: Current (Nightly)
>            Reporter: James Clark
>            Priority: Minor
>
> Nul-terminated strings are fine for short strings, but for potentially long strings, it's better to use a pointer plus a length.  (Sometimes it's good to nul-terminate it as well as providing a length.)  One case where I would in particular suggest using a length is for axiom_text.  At the same time, other functions that deal with XML text content (such as axiom_xml_writer::write_characters) should also be fixed.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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