2009-04-24 16:23:00 UTC
Ooops! Missed this message somehow.
Anyhow, ssize_t is not a standard defined type. I.e., its not defined for Microsoft, Watcom or Borland C or C++ as far as I know. I wanted to use a type for ->slen which would not increase the number of compiler warnings from truncations and which was signed. Furthermore, its rare to need a string > 32767 in length, so it seemed like an acceptable decision.
If you truly have strings > (1<<31)-1 in length, then your concern is not fast indexed access to each character (which is really what bstrlib gives you) but rather with how you abstract the storage of such strings. In which case, I think a bsStream is usually a better abstraction.
If you can truly make the case, perhaps I can change the size to something like blengthscalar_t which would be typedefed at the beginning of bstrlib.h and could be set to ssize_t or int or any other large enough signed scalar.
Paul