Bert Belder
91ecfbcae8
Remove platform_win32_winsock
2011-08-02 18:38:34 +02:00
Ben Noordhuis
a7bdaabf60
Include "platform.h", not <platform.h> - conflicts with system headers
...
Fixes #1003 .
2011-07-26 22:05:08 +02:00
Ryan Dahl
041c983290
Merge branch 'v0.4'
...
Conflicts:
deps/libev/wscript
doc/api/modules.markdown
2011-07-14 15:52:08 -07:00
koichik
5208abe723
Fix Buffer drops last null character in UTF-8
...
Reproduce:
$ node
> buf = new Buffer('\0')
<Buffer >
> buf.length
0
> buf = new Buffer(1)
<Buffer 28>
> buf.write('\0')
0
Fixes #394 .
Fixes #1210 .
2011-07-14 02:21:56 +09:00
Ryan Dahl
59274e8a33
Merge branch 'v0.4'
...
Conflicts:
lib/crypto.js
lib/tls.js
2011-05-20 10:29:16 -07:00
Ryan Dahl
5e409c2f1a
makeFastBuffer should not segfault but rather throw on non-buffer
2011-05-19 12:13:48 -07:00
Konstantin Käfer
5e1b7cadb4
Add Buffer::fill method to do memset
...
Fixes #477 .
2011-05-06 13:39:12 -07:00
Ryan Dahl
598792ba91
Merge branch 'v0.4'
...
Conflicts:
src/platform_sunos.cc
test/simple/test-os.js
2011-04-14 01:11:21 +00:00
koichik
9533e879f0
Fix Buffer.write() with UCS-2 should not be write partial char
...
closes #916 .
2011-04-13 09:55:49 -07:00
Ryan Dahl
7a8c729830
Merge branch 'v0.4'
...
Conflicts:
src/node_version.h
2011-03-22 13:12:07 -07:00
Ryan Dahl
8b33a1d8e4
Guard failed buffer constructions.
...
Thanks to Jeremy Barnes for pointing it out.
2011-03-22 13:10:53 -07:00
Ryan Dahl
247d880113
Merge branch 'v0.4'
...
Conflicts:
src/node_version.h
2011-03-14 17:45:15 -07:00
Ryan Dahl
55048cdf79
Update copyright headers
2011-03-14 17:37:05 -07:00
isaacs
0aa1a8a005
Closes GH-695 Add 'hex' encoding to Buffer
2011-02-19 19:24:23 -08:00
Ryan Dahl
0474ce6790
Revert "buffer.toString() shouldn't include null values"
...
This reverts commit 909a5b39d2 .
Will fix inside V8's String::New instead.
2011-02-15 12:07:43 -08:00
Ryan Dahl
909a5b39d2
buffer.toString() shouldn't include null values
2011-02-14 14:27:02 -08:00
Konstantin Käfer
9e101f2b01
UCS-2 support
...
Closes GH-644.
2011-02-07 13:35:06 -08:00
Bert Belder
e0f47be9d0
Clean up the way windows headers are included
...
Plus make inclusion order a little more consistent in general
2011-01-18 04:58:11 +01:00
Bert Belder
4a2cb07808
Fix whitespace errors introduced by porting efforts
2010-12-20 23:51:25 +01:00
Bert Belder
6d1af51de6
Fix header files for node_buffer.cc
2010-12-20 23:50:35 +01:00
Sean Braithwaite
fcc38129a3
Check buffer length using string length
...
+ Utf8Length is really slow but has the same semantics in this case
2010-12-03 15:55:03 -08:00
Tom Hughes
6285fac232
Allocations with new[] must be freed with delete[].
...
See http://valgrind.org/docs/manual/mc-manual.html#mc-manual.rudefn
2010-11-24 12:53:28 -08:00
Ryan Dahl
2320497992
Revert "Merge branch 'writev'"
...
This reverts commit cd9515efd9 , reversing
changes made to df46c8e698 .
Too slow. Needs more work.
2010-11-20 20:55:15 -08:00
Ryan Dahl
56074d1056
Inline Buffer::Length and Buffer::Data
2010-11-20 00:04:22 -08:00
Ryan Dahl
3884b4185a
Small clean ups
2010-11-18 16:47:38 -08:00
Ryan Dahl
d74c506044
Support encoding
2010-11-18 16:47:37 -08:00
Ryan Dahl
dcc4fffe4d
Add C++ API for constructing fast buffer from string
2010-10-26 13:43:58 -07:00
Stéphan Kochen
dd52737476
Provide a C++ Buffer constructor for external storage.
...
In order to do this, buffer data management was moved out of the
JS entry-point New, and into Replace.
Secondly, the constructor makes an immediate call to Replace, and
in order for ArrayData calls to work, wrapping must already be set
up. Now, the constructor takes the wrappee as a parameter.
2010-10-22 16:52:14 -07:00
Stéphan Kochen
b3e60c7b25
Generalize Buffer::Copy to work with all unsigned byte external data.
2010-10-22 13:47:10 -07:00
Stéphan Kochen
d5e966154c
Simplify things by using *ArrayData everywhere.
2010-10-22 13:32:48 -07:00
Stéphan Kochen
d9b08d66d6
Remove old interface remains from Buffer.
...
These were all lacking implementation, so deprecating wouldn't help.
2010-10-22 13:32:31 -07:00
Jorge Chamorro Bieling
c735b4663a
unbase64 skips over *any* illegal chars
2010-10-18 15:22:10 -07:00
Ryan Dahl
cf1db4f304
base64 decode should handle whitespace
2010-10-18 11:34:35 -07:00
Ryan Dahl
9d248f690a
Fix return in Buffer::New
2010-10-10 19:24:33 -07:00
Ryan Dahl
0cf03ab800
Add char* constructor for Buffer
2010-10-10 19:08:51 -07:00
Ryan Dahl
fe74283e1d
Fix a few compiler warnings...
2010-10-09 16:04:38 -07:00
Ryan Dahl
b5359e40be
Warnings for new C++ buffer API
2010-10-09 12:15:16 -07:00
Ben Noordhuis
55c65cc2d5
Safe constructor for ObjectWrapped classes
...
New() methods should be invoked as constructors, not regular functions.
Corner cases like Script::New() may cause a SIGSEGV when the GC is run.
More details: http://groups.google.com/group/nodejs/browse_thread/thread/a7e5db68d4cd6356
2010-09-29 16:02:45 -07:00
Ryan Dahl
b8bfbdab48
Rename SlowBuffer in binding
2010-09-09 11:03:51 -07:00
Ryan Dahl
5bc4efe820
Remove blobs, simplify SlowBuffer
...
Implement SlowBuffer.prototype.slice in js
2010-09-09 11:03:51 -07:00
Ryan Dahl
380d12832c
Remove dead code
2010-09-09 11:03:50 -07:00
Ryan Dahl
efc723787a
Fix big string bug
2010-09-09 11:03:50 -07:00
Ryan Dahl
71d67dbf48
Remove fancy SlowBuffer constructor
2010-09-09 11:03:50 -07:00
Ryan Dahl
6135941eea
Fix ByteLength hangup
2010-09-09 11:03:50 -07:00
Ryan Dahl
ececd92f62
Fix base64 write for buffers
2010-09-09 11:03:49 -07:00
Ryan Dahl
1f947f7b41
remove unnecessary casts
2010-09-09 11:03:49 -07:00
Ryan Dahl
7b772f3f68
More fast buffer work
2010-09-09 11:03:48 -07:00
Ryan Dahl
d5bdda74c1
fast buffer bounds checking in copy()
2010-09-09 11:03:48 -07:00
Ryan Dahl
1cf538a60a
Work to get C++ fast buffers. incomplete
2010-09-09 11:03:48 -07:00
Ryan Dahl
565d862f3c
Fix buffer binding
2010-09-09 11:03:48 -07:00