diff options
author | isaacs <i@izs.me> | 2012-05-16 16:32:37 -0700 |
---|---|---|
committer | isaacs <i@izs.me> | 2012-05-16 16:32:37 -0700 |
commit | a3753b496e468ac24eee280485704db1241e75b5 (patch) | |
tree | 34c3426cadcd4d898b8b7219a77a2b06b71e8f4b /src | |
parent | 9fc7283a403bb0dec096b76991226cba8e7b73c2 (diff) | |
download | node-a3753b496e468ac24eee280485704db1241e75b5.tar.gz |
Revert "Fix #3242 Actually deprecate 'binary' buffer encoding"
This reverts commit 5979f096d1b702ca2ba95664a0bbc8210109775b.
Related:
- #3279
- #3278
Diffstat (limited to 'src')
-rw-r--r-- | src/node.cc | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/src/node.cc b/src/node.cc index c5700c2cc..4a42a052c 100644 --- a/src/node.cc +++ b/src/node.cc @@ -1111,18 +1111,16 @@ enum encoding ParseEncoding(Handle<Value> encoding_v, enum encoding _default) { } else if (strcasecmp(*encoding, "ucs-2") == 0) { return UCS2; } else if (strcasecmp(*encoding, "binary") == 0) { - fprintf(stderr, "The 'binary' buffer encoding is deprecated. " - "Use a Buffer object directly.\n"); return BINARY; } else if (strcasecmp(*encoding, "hex") == 0) { return HEX; } else if (strcasecmp(*encoding, "raw") == 0) { fprintf(stderr, "'raw' (array of integers) has been removed. " - "Use a Buffer object directly.\n"); + "Use 'binary'.\n"); return BINARY; } else if (strcasecmp(*encoding, "raws") == 0) { - fprintf(stderr, "'raws' (array of integers) has been removed. " - "Use a Buffer object directly.\n"); + fprintf(stderr, "'raws' encoding has been renamed to 'binary'. " + "Please update your code.\n"); return BINARY; } else { return _default; @@ -1156,8 +1154,8 @@ ssize_t DecodeBytes(v8::Handle<v8::Value> val, enum encoding encoding) { HandleScope scope; if (val->IsArray()) { - fprintf(stderr, "'raw' (array of integers) has been removed. " - "Use a Buffer object directly.\n"); + fprintf(stderr, "'raw' encoding (array of integers) has been removed. " + "Use 'binary'.\n"); assert(0); return -1; } @@ -1193,8 +1191,8 @@ ssize_t DecodeWrite(char *buf, // http://groups.google.com/group/v8-users/browse_thread/thread/1f83b0ba1f0a611 if (val->IsArray()) { - fprintf(stderr, "'raw' (array of integers) has been removed. " - "Use a Buffer object directly.\n"); + fprintf(stderr, "'raw' encoding (array of integers) has been removed. " + "Use 'binary'.\n"); assert(0); return -1; } |