Commit Graph

75 Commits

Author SHA1 Message Date
kenton@google.com
41c3760f2f Update extract_includes.bat to include new public headers in rev 120. 2009-04-28 01:51:27 +00:00
kenton@google.com
ccc11678c7 Make building libprotobuf as a DLL work again. 2009-04-28 01:48:06 +00:00
kenton@google.com
ef3730c2df Add test verifying that protoc accepts trailing backslashes on Windows, which some users claim doesn't work. Seems to work on my machine. 2009-04-28 00:49:36 +00:00
kenton@google.com
d33e53ad4c That last rev shouldn't have compiled, but apparently did, for some reason. Fixed. 2009-04-28 00:44:15 +00:00
kenton@google.com
db4b583084 Protect a new death test with GTEST_HAS_DEATH_TEST, since MinGW doesn't support it. 2009-04-28 00:42:42 +00:00
kenton@google.com
50ede8ba17 Update MSVC project files for rev 120, and add instructions for compiling with zlib. 2009-04-27 22:28:10 +00:00
kenton@google.com
d37d46dfbc Integrate recent changes from Google-internal code tree. See CHANGES.txt
for details.
2009-04-25 02:53:47 +00:00
kenton@google.com
709ea28f32 Work around windows.h #defining GetMessage(). 2009-04-22 20:06:20 +00:00
kenton@google.com
6f9bc71ffd Add missing LIBPROTOBUF_EXPORT. 2009-04-22 04:04:27 +00:00
kenton@google.com
679edc415e Remove scoped_memory_log.h from MSVC project files -- it has not existed for some time. 2009-04-22 03:23:51 +00:00
kenton@google.com
4152d554c4 Handle .exe extension when looking for protoc in setup.py. 2009-04-22 03:20:21 +00:00
kenton@google.com
bbbd4d309c Update MSVC project files to work with new gtest bundling strategy. 2009-04-22 01:34:07 +00:00
kenton@google.com
37ad00d2c4 Update bundled gtest to latest version (1.3.0) and include it as a
nested autoconf package rather than as raw source.  This way we can
trivially update it again in the future.

Actually, this change doesn't even include gtest in protobuf's SVN.
Instead, we auto-download it when autogen.sh is invoked.  Note that
it will be included in release distributions, though.

TODO:
* Add a configure option to use the system's installed gtest rather
  than the bundled copy.  Apparently the gtest maintainers are working
  on some general-purpose autoconf macros which will do this
  automagically.
* Update MSVC project files.
2009-04-21 21:00:39 +00:00
kenton@google.com
a6de64aef3 setup.py shouldn't fail if protoc path contains whitespace. 2009-04-18 02:28:15 +00:00
kenton@google.com
9af2f4c50b Update ez_setup.py to latest version, so it works with Python 2.6. 2009-04-18 02:16:43 +00:00
kenton@google.com
a8e8ccf29c Improve performance of Python serialization. Patch from Will Pierce. 2009-04-18 02:01:27 +00:00
kenton@google.com
6dcd46c8d2 Fix initialization ordering problem in logging code. Based on patch from Wink Saville. 2009-04-18 01:24:27 +00:00
kenton@google.com
cfa2d8aa87 Generate field number constants. Patch from Michael Poole. 2009-04-18 00:02:12 +00:00
kenton@google.com
eb26a1efde Commit Michael Poole's patch for explicitly constructing all class fields in
generated code.
2009-04-16 22:43:40 +00:00
kenton@google.com
e59427a62c Commit Brian Olson's gzip stream implementations. 2009-04-16 22:30:56 +00:00
kenton@google.com
f663b1602d Adds a flag to protoc called --error_format which specifies what
convention to use when printing errors.  Default is GCC, but Microsoft
Visual Studio is another option.  This allows errors to be clickable in
the MSVS error log.
2009-04-15 19:50:54 +00:00
jonathan.skeet
90bdae226e Update benchmark data. 2009-03-05 23:16:14 +00:00
jonathan.skeet
8604c745fc Added copyright notice, made constants constant, added GC call before each test. 2009-03-05 11:10:35 +00:00
jonathan.skeet
ff9c9e4d93 Initial benchmarking. 2009-03-05 11:00:49 +00:00
kenton@google.com
1556623fad Submit files missing from previous submit. 2009-02-10 17:47:02 +00:00
kenton@google.com
2d6daa72ab Push out changes from internal codebase.
All Languages
* Repeated fields of primitive types (types other that string, group, and
  nested messages) may now use the option [packed = true] to get a more
  efficient encoding.  In the new encoding, the entire list is written
  as a single byte blob using the "length-delimited" wire type.  Within
  this blob, the individual values are encoded the same way they would
  be normally except without a tag before each value (thus, they are
  tightly "packed").

C++
* UnknownFieldSet now supports STL-like iteration.
* Message interface has method ParseFromBoundedZeroCopyStream() which parses
  a limited number of bytes from an input stream rather than parsing until
  EOF.

Java
* Fixed bug where Message.mergeFrom(Message) failed to merge extensions.
* Message interface has new method toBuilder() which is equivalent to
  newBuilderForType().mergeFrom(this).
* All enums now implement the ProtocolMessageEnum interface.
* Setting a field to null now throws NullPointerException.
* Fixed tendency for TextFormat's parsing to overflow the stack when
  parsing large string values.  The underlying problem is with Java's
  regex implementation (which unfortunately uses recursive backtracking
  rather than building an NFA).  Worked around by making use of possesive
  quantifiers.

Python
* Updated RPC interfaces to allow for blocking operation.  A client may
  now pass None for a callback when making an RPC, in which case the
  call will block until the response is received, and the response
  object will be returned directly to the caller.  This interface change
  cannot be used in practice until RPC implementations are updated to
  implement it.
2009-01-22 01:27:00 +00:00
pesho.petrov
87e64e1cee Adding slicing support for repeated scalar fields and get/delete slice for composite fields. 2008-12-24 01:07:22 +00:00
kenton@google.com
d41578239c Update trunk version to 2.0.4-SNAPSHOT. 2008-12-05 22:04:06 +00:00
kenton@google.com
2f3d8de767 Submit script used to post-process dist files. 2008-12-05 18:05:46 +00:00
kenton@google.com
25bc5cdc9c Support "Solaris 10 using recent Sun Studio".
Patch from Monty Taylor <monty.taylor@gmail.com>.
2008-12-04 20:34:50 +00:00
kenton@google.com
1ea526879c Add full-system test for custom enum value options. (Previously, only a
parsing test in parser_unittest.cc existed.)
2008-12-02 20:08:45 +00:00
kenton@google.com
2f669cbe75 * Avoid using pushd/popd in generate_descriptor_proto.sh because they are
bash-only features, and /bin/sh is not a symlink to bash on all systems.
* If an input file is a Windows absolute path (e.g. "C:\foo\bar.proto") and
  the import path only contains "." (or contains "." but does not contain
  the file), protoc incorrectly thought that the file was under ".", because
  it thought that the path was relative (since it didn't start with a slash).
  This has been fixed.
2008-12-02 05:59:15 +00:00
kenton@google.com
eb241fadf2 Fix call to superclass.__init__() to work on newer versions of Python. 2008-12-02 02:33:13 +00:00
kenton@google.com
a001ed0c03 * Update version compatibility stuff -- 2.0.3 is in no way compatible with
2.0.2.
* Minor Tru64 fix.
2008-12-01 23:47:49 +00:00
kenton@google.com
9f1752889c Update CHANGES.txt with stuff from 2.0.3. 2008-11-25 19:37:10 +00:00
kenton@google.com
26bd9eee6e Integrate changes from internal code.
protoc
* Enum values may now have custom options, using syntax similar to field
  options.
* Fixed bug where .proto files which use custom options but don't actually
  define them (i.e. they import another .proto file defining the options)
  had to explicitly import descriptor.proto.
* Adjacent string literals in .proto files will now be concatenated, like in
  C.

C++
* Generated message classes now have a Swap() method which efficiently swaps
  the contents of two objects.
* All message classes now have a SpaceUsed() method which returns an estimate
  of the number of bytes of allocated memory currently owned by the object.
  This is particularly useful when you are reusing a single message object
  to improve performance but want to make sure it doesn't bloat up too large.
* New method Message::SerializeAsString() returns a string containing the
  serialized data.  May be more convenient than calling
  SerializeToString(string*).
* In debug mode, log error messages when string-type fields are found to
  contain bytes that are not valid UTF-8.
* Fixed bug where a message with multiple extension ranges couldn't parse
  extensions.
* Fixed bug where MergeFrom(const Message&) didn't do anything if invoked on
  a message that contained no fields (but possibly contained extensions).
* Fixed ShortDebugString() to not be O(n^2).  Durr.
* Fixed crash in TextFormat parsing if the first token in the input caused a
  tokenization error.

Java
* New overload of mergeFrom() which parses a slice of a byte array instead
  of the whole thing.
* New method ByteString.asReadOnlyByteBuffer() does what it sounds like.
* Improved performance of isInitialized() when optimizing for code size.

Python
* Corrected ListFields() signature in Message base class to match what
  subclasses actually implement.
* Some minor refactoring.
2008-11-21 00:06:27 +00:00
kenton@google.com
a2a32c2043 Support HP C++ on Tru64.
Patch (mostly) by Vincent Choinière <Choiniere.Vincent@hydro.qc.ca>.
2008-11-14 17:29:32 +00:00
kenton@google.com
8da400ed12 Fix bugs in zero_copy_stream_impl.
Patch from Frank Chu.
2008-11-07 18:38:13 +00:00
kenton@google.com
32d0c3b853 Only build tests when running "make check", not "make". 2008-11-07 18:06:24 +00:00
kenton@google.com
d0580eafd3 Fixed alignment issue that caused bus errors on platforms like sparc which
require all memory reads to be aligned.  Specifically, it turns out that
sizeof(RepeatedField<bool>) is 20 on 64-bit sparc with GCC 3.4.6.  This is
strange, since one of RepeatedField's members is a pointer, which I thought
meant that it had to be 64-bit aligned, which means its size should be a
multiple of 64 bits.  But, 20 is not a multiple of 8.  I don't understand why
this is the case, but if this is possible, then DynamicMessage's strategy of
sorting fields in descending order by size and then tightly packing doesn't
work.  To fix this, I got rid of the sort step and instead added code that
aligns each field's offset appropriately based on the field's size.

Also in this revision:  Fix an error message that named a flag incorrectly.
2008-11-07 02:07:18 +00:00
kenton@google.com
de75437573 Simplify some template usage so that older compilers can handle it. (Users
report that MSVC 2003 in particular needs this change.)
2008-11-06 21:36:28 +00:00
kenton@google.com
3e91fcdd87 Work around GCC 4.3.0 x86_64 compiler bug (seen on Fedora 9).
Details:

For each message type, protoc generates an array of byte offsets of each of
the fields within the message class.  These offsets are later used by the
reflection implementation.  Prior to this revision, the offset arrays were
allocated as global variables.  Since they were just arrays of ints, they
should have been initialized at compile time.  Unfortunately, GCC 4.3.0
incorrectly decides that they cannot be initialized at compile time because
the values used to initialize the array have type ptrdiff_t, and GCC 4.3.0
does not recognize that it can convert ptrdiff_t to int at compile time.  This
bug did not seem to exist in previous versions of GCC.  Google's compiler
team has submitted a fix for this bug back to the GCC project, but we will
have to work around it anyway since Fedora 9 shipped with GCC 4.3.0.
2008-11-06 04:37:30 +00:00
kenton@google.com
580cf3c47c Update MSVC installation instructions for static linking change. 2008-10-21 17:18:26 +00:00
kenton@google.com
3bdc135653 Avoid an "unused parameter" warning when using high warning levels. 2008-10-16 23:00:34 +00:00
kenton@google.com
7b29a2695c Update version number to 2.0.3-SNAPSHOT. 2008-10-16 22:56:18 +00:00
kenton@google.com
16b31d2a94 Make Python example output identical to C++ and Java by removing redundant
spaces.
2008-10-07 02:38:12 +00:00
kenton@google.com
a41a9dd532 * Fixed template specialization syntax that MSVC 2005 didn't like. Not sure if
it was valid or not.
* Moved UTF-8 coding directive to the right place in reflection_test.py.
2008-10-03 17:27:48 +00:00
kenton@google.com
c76caaccb8 Improvements to configure.ac from Jeff Bailey. 2008-09-30 22:11:21 +00:00
kenton@google.com
cf3f638c92 Pass -Wall,no-obsolete to autoreconf. 2008-09-30 22:01:45 +00:00
kenton@google.com
7516a69050 Improve autogen.sh. 2008-09-30 20:55:25 +00:00