-
Notifications
You must be signed in to change notification settings - Fork 1
/
ChangeLog
155 lines (100 loc) · 5 KB
/
ChangeLog
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
2010-04-01 version 1.1:
* Bugfix: protobuf-perlxs 1.0 could not be compiled with a protobuf
version earlier than 2.2.0.
* Bugfix: to_hashref() lower-cased field names. Thanks to Nacho
Gutierrez for the patch.
2010-03-09 version 1.0:
* Bugfix: generated code for enums with --perlxs-package set was
incorrect.
2010-03-09 version 0.9:
* Issue 6: optimize_for = LITE_RUNTIME causes compilation errors
* Bugfix: Added AC_LANG([C++]) to configure.ac, to fix broken
detection of protobuf headers.
* Compatibility: Added -lpthread, for linking with more recent
versions of protobuf libraries.
* Feature: Added support for the --perlxs-package option (not yet
documented). Use this to override the package option
value in a .proto file during Perl/XS code generation.
2009-05-28 version 0.8:
* Issue 5: eval { } doesn't catch protobuf->pack() fatal errors
2009-01-23 version 0.7:
* Issue 4: String and bytes types are truncated when using NUL
characters due to char * handling in generated XS code
(Patch contributed by Jason Hord).
* Bugfix: Packed message that were multiples of 8 bytes long did
not have their Perl string length set correctly.
* Added an example (string_bytes) to check regressions on the
bugs fixed in this release.
* Added an example (package) showing the use of multiple top-level
messages in the same package namespace.
2009-01-20 version 0.6:
* Issue 3: Off-by-one error in XS generated code for initializing
repeated elements in ->new() (Patch contributed by
Jason Hord).
* Separated generated POD documentation from .pm files into .pod
files.
* Eliminated the need to generate (and use) typemap files.
* Performance enhancement: pack() uses a ZeroCopyStream to avoid
an extra string copy. The performance of packing large messages
is roughly twice as good as it was before.
* Added an example that packs and unpacks a large message. Found
that the performance of populating, packing, and unpacking a
message with 10 strings of 2 MB each was:
Implementation pack unpack pack + unpack
--------------------------------------------------------------
Storable freeze/thaw 0.052991 0.032896 0.085887
protoxs/NoZeroCopy 0.067012 0.023046 0.090058
protoxs/ZeroCopy 0.042966 0.020175 0.063141
All three methods are quite fast, but protoxs/ZeroCopy wins by a
significant margin, with an overall pack + unpack throughput of
~316 MB/s, compared with 232 MB/s for Storable and ~222 MB/s for
protoxs/NoZeroCopy.
2009-01-14 version 0.5:
* Bugfix: generated code had numerous issues. Patch contributed
by Seth Daniel.
* New example illustrating use of protobuf types.
2009-01-09 version 0.4:
* New method in generated classes:
my @fields = $message->fields();
@fields is an array of strings. Each string corresponds to the
name of a class member. Contributed by Seth Daniel.
* New method in generated classes:
my $hashref = $message->to_hashref();
$hashref is a complete, Data::Dumper-style recursive dump of the
message and all of its embedded messages.
* Extended methods copy_from() and merge_from():
In addition to their pre-existing ability to copy and merge a
message instance from another instance of the same message type,
these methods may also be used with a hashref argument, of the
sort that might be generated by the to_hashref() method. This
makes it easy to build messages from hashrefs:
my $message = Foo->new;
$message->copy_from({ bar => 'baz', bat => 'qux' });
Note that for both of these methods, failure to provide a
hash value for any of the required fields of a message is
silently ignored, for the following reasons:
1) In some cases, the user may wish to build the message one
part at a time via merge_from() of multiple different
hashrefs, ultimately yielding a complete message instance.
2) In any case, missing required fields will be reported when
the user unsuccessfully attempts to serialize the message.
* Extended message constructors
It is now possible to instantiate a message with a hashref as
the sole constructor argument:
my $message = Foo->new({ bar => 'baz', bat => 'qux' });
This is equivalent to:
my $message = Foo->new;
$message->copy_from({ bar => 'baz', bat => 'qux' });
It is also possible to instantiate a message with a scalar as
the sole constructor argument:
my $packed = Foo->new({ bar => 'baz'})->pack;
my $foo2 = Foo->new($packed);
In this case, the scalar is interpreted as a packed message
of the given type.
2008-11-19 version 0.3:
* Issue 1: undef symbols in OS/X (need to link with libprotobuf).
* Issue 2: Embedded message code generated with Perl class name.
2008-10-01 version 0.2:
* Removed CamelCase of class and enum names.
2008-09-19 version 0.1:
* Initial version.