At 12:00 AM +0100 11/11/04, Bernhard Schmalhofer wrote:

From strings.pod I gather that the op 'pin' is meant to make strings fit
for
passing strings to external libraries. For me it would be convenient, if
'pin' would put a trailing '\0' at the end of the used string buffer. Also a
pinned string shouldn't have to be copied into newly allocated memory.

Sort of. The point is to make the string not move. Generally for external libraries, but not universally.


It shouldn't add the trailing null, because that would be modifying the buffer. If you want to make sure there's a null on the end of the string, then the best thing to do is put one there yourself. (Which, since it's your data, would be a safe thing to do)
--
Dan


--------------------------------------it's like this-------------------
Dan Sugalski                          even samurai
[EMAIL PROTECTED]                         have teddy bears and even
                                      teddy bears get drunk

Reply via email to