Thrift: Generate structural fingerprints for thrift structs.
authorDavid Reiss <dreiss@apache.org>
Tue, 28 Aug 2007 20:49:17 +0000 (20:49 +0000)
committerDavid Reiss <dreiss@apache.org>
Tue, 28 Aug 2007 20:49:17 +0000 (20:49 +0000)
commit18bf22d5ba896026b5b2ba500f84b003e343c3b1
tree1207865ba6c735462f5da4b2f531f061767bbcfa
parent2375312fa05e1560f0fc83c642dcb2535d9d2eba
Thrift: Generate structural fingerprints for thrift structs.

Summary:
We are going to write a dense protocol soon that eliminates some metadata.
To prevent version conflicts, we want each structure to have a
structural fingerprint that will change whenever the struct changes
in a way that will affect the dense protocol.
This change computes those fingerprints and puts them in
the generated C++ code.

Reviewed By: aditya, mcslee

Test Plan:
Recompiled thrift.
Thrifted DebugProtoTest with old and new compilers.
Compared output.
Also ran thrift with those "cout"s uncommented,
examined the fingerprint material,
and verified the hashes.

Revert Plan: ok

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665227 13f79535-47bb-0310-9956-ffa450edef68
15 files changed:
compiler/cpp/Makefile.am
compiler/cpp/src/generate/t_cpp_generator.cc
compiler/cpp/src/main.cc
compiler/cpp/src/md5.h [new file with mode: 0644]
compiler/cpp/src/md5c.c [new file with mode: 0644]
compiler/cpp/src/parse/t_base_type.h
compiler/cpp/src/parse/t_enum.h
compiler/cpp/src/parse/t_field.h
compiler/cpp/src/parse/t_list.h
compiler/cpp/src/parse/t_map.h
compiler/cpp/src/parse/t_service.h
compiler/cpp/src/parse/t_set.h
compiler/cpp/src/parse/t_struct.h
compiler/cpp/src/parse/t_type.h
compiler/cpp/src/parse/t_typedef.h