merged with revision 332 of http://protobuf-c.googlecode.com/svn/trunk