779f61c6a3
protoc - New flags --encode and --decode can be used to convert between protobuf text format and binary format from the command-line. - New flag --descriptor_set_out can be used to write FileDescriptorProtos for all parsed files directly into a single output file. This is particularly useful if you wish to parse .proto files from programs written in languages other than C++: just run protoc as a background process and have it output a FileDescriptorList, then parse that natively. C++ - Reflection objects are now per-class rather than per-instance. To make this possible, the Reflection interface had to be changed such that all methods take the Message instance as a parameter. This change improves performance significantly in memory-bandwidth-limited use cases, since it makes the message objects smaller. Note that source-incompatible interface changes like this will not be made again after the library leaves beta. Python - MergeFrom(message) and CopyFrom(message) are now implemented. - SerializeToString() raises an exception if the message is missing required fields. - Code organization improvements. - Fixed doc comments for RpcController and RpcChannel, which had somehow been swapped.
28 lines
811 B
Bash
Executable File
28 lines
811 B
Bash
Executable File
#!/bin/sh
|
|
|
|
# Run this script to regenerate descriptor.pb.{h,cc} after the protocol
|
|
# compiler changes. Since these files are compiled into the protocol compiler
|
|
# itself, they cannot be generated automatically by a make rule. "make check"
|
|
# will fail if these files do not match what the protocol compiler would
|
|
# generate.
|
|
|
|
if test ! -e src/google/protobuf/stubs/common.h; then
|
|
cat >&2 << __EOF__
|
|
Could not find source code. Make sure you are running this script from the
|
|
root of the distribution tree.
|
|
__EOF__
|
|
exit 1
|
|
fi
|
|
|
|
if test ! -e src/Makefile; then
|
|
cat >&2 << __EOF__
|
|
Could not find src/Makefile. You must run ./configure (and perhaps
|
|
./autogen.sh) first.
|
|
__EOF__
|
|
exit 1
|
|
fi
|
|
|
|
pushd src
|
|
make protoc && ./protoc --cpp_out=dllexport_decl=LIBPROTOBUF_EXPORT:. google/protobuf/descriptor.proto
|
|
popd
|