'\0' is a valid ASCII character.

http://www.klcconsulting.net/ascii.htm

Alan Gutierrez - [email protected] - http://twitter.com/bigeasy

On Sep 22, 2010, at 2:58 AM, fuzzy spoon wrote:

It seems like a safe guard for buffer* having '\0' in it (obviously, i know you knew that).

To me it seems like an issue, because char* uses '\0' to denote the end of the string, but perhaps writing a buffer or multiple strings in the same buffer was causing problems with the strings stopping at string 1, so this was added because the supplied length is explicit.

ie : it _allows_ you to write strings contiguous in memory provided you know how long they are combined (including the zero-termination for each).

Perhaps it's a neat trick for performance reasons?
Im curious - does it impact performance at all?
Or does it break a normal char* by changing its terminator to a space?

On Wed, Sep 22, 2010 at 12:28 AM, <[email protected]> wrote:
What is the purpose of this line?

http://github.com/ry/node/blob/9922e4e433996722a76edb46d14f1729f33b4bed/deps/v8/src/api.cc#L300
5



--
v8-users mailing list
[email protected]
http://groups.google.com/group/v8-users

Reply via email to