cmpilato@collab.net writes:
> Karl and I are chatting about the FS function arguments of type 'char
> *', specifically about how those aren't svn_string_t's. Is there any
> compelling reason why these should *not* be svn_string_t's?
Legal values for those arguments may not contain null characters. For
such values, char * is a lot more comfortable to work with than
svn_string_t. svn_string_t does have some advantages:
- stores length explicitly, to avoid scans
- has separate `length' and `size', to allow strings to be constructed
piece by piece in linear time
but I don't see that either of these are pressing issues for us at the
moment. I'd be happy to see profiling that shows otherwise --- after
the first release.
I kind of feel that paths should never be using svn_string_t. So I
think there are two things we should do:
1) Use char * throughout Subversion for paths.
2) Think through a decent path-handling library, that will actually
protect code from Windows / Unix / VMS differences, etc., based on
plain old char *. Surely such libraries have been designed many
times.
Received on Sat Oct 21 14:36:23 2006