chrisdew / protobuf

Protocol Buffers for Node.JS
http://code.google.com/p/protobuf-for-node/
Apache License 2.0
234 stars 70 forks source link

Return and accept strings for int64s #19

Closed seishun closed 12 years ago

seishun commented 12 years ago

In a previous PR I used Buffers primarily because a user might need to write the value to another Buffer (e.g. a TCP socket). However, I found out that the ref module provides writeInt64 functions that accept strings - and strings are infinitely more usable than Buffers.

chrisdew commented 12 years ago

I think this patch is well worth having, until we figure out a good way to parameterise return types. i.e. uint64 -> String | Number | Buffer and enum -> String | Number.