You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@avro.apache.org by dc...@apache.org on 2012/01/26 15:02:12 UTC
svn commit: r1236182 - in /avro/trunk: CHANGES.txt lang/c/src/avropipe.c
Author: dcreager
Date: Thu Jan 26 14:02:11 2012
New Revision: 1236182
URL: http://svn.apache.org/viewvc?rev=1236182&view=rev
Log:
AVRO-1004. C: avropipe: Don't display NUL terminators for string values.
Modified:
avro/trunk/CHANGES.txt
avro/trunk/lang/c/src/avropipe.c
Modified: avro/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/avro/trunk/CHANGES.txt?rev=1236182&r1=1236181&r2=1236182&view=diff
==============================================================================
--- avro/trunk/CHANGES.txt (original)
+++ avro/trunk/CHANGES.txt Thu Jan 26 14:02:11 2012
@@ -80,6 +80,9 @@ Avro 1.6.2 (unreleased)
AVRO-1003. C: Fix pkg-config file when codecs are missing.
(dcreager)
+ AVRO-1004. C: avropipe no longer displays NUL terminator for string
+ values. (dcreager)
+
Avro 1.6.1 (8 November 2011)
INCOMPATIBLE CHANGES
Modified: avro/trunk/lang/c/src/avropipe.c
URL: http://svn.apache.org/viewvc/avro/trunk/lang/c/src/avropipe.c?rev=1236182&r1=1236181&r2=1236182&view=diff
==============================================================================
--- avro/trunk/lang/c/src/avropipe.c (original)
+++ avro/trunk/lang/c/src/avropipe.c Thu Jan 26 14:02:11 2012
@@ -286,7 +286,8 @@ process_value(const char *prefix, avro_v
size_t size;
avro_value_get_string(value, &buf, &size);
printf("%s\t", prefix);
- print_bytes_value(buf, size);
+ /* For strings, size includes the NUL terminator. */
+ print_bytes_value(buf, size-1);
printf("\n");
return;
}