John Bandhauer <[EMAIL PROTECTED]> writes: > Darin Fisher wrote: > > > xpidl currently supports nsAString as a scriptable data type, but it > > does not support nsACString as a scriptable data type. i scratched my > > head, and couldn't come up with a reason for why this might be the case. > > if we can support nsAString, then it seems like we should also be able > > to support nsACString. > > > > nsACString's as parameters would be particularly useful to necko, which > > currently deals primarily with |char| arrays and as a result is forced > > to malloc'ate all string out parameters (in order to maintain scriptable > > interfaces). it would be really nice and likely improve performance in > > a significant way if necko could instead simply write to a nsACString. > > > > so, i'm wondering... what is keeping xpidl from providing a nsACString > > data type? > > [...] > > There is also the debate about UTF8 in > http://bugzilla.mozilla.org/show_bug.cgi?id=84186 to consider.
Indeed; this sounds like another good reason to have an ACString idl type that is encoding-agnostic. It would certainly resolve the problem that caused me to file that bug. > already have 5 string types. How many do we need? What is the > chance we'll ever retire one? If this is really a concern, I nominate counted strings and wstrings. A quick grep of the mozilla tree shows 5 interfaces that use counted strings, and 2 that use counted wstrings. Dan
