Paul Yang
b258ae3235
Fix mac use local timezone for strptime by default. ( #127 )
...
* Fix mac use local timezone for strptime by default.
* Fix comments
* Check len == UPB_TIMESTAMP_BASE_SIZE
* Fix comment
6 years ago
Paul Yang
706ffdbc65
Fix json encoding for wrappers, ListValue, Struct and Value. ( #126 )
...
* Fix json encoding for wrappers, ListValue, Struct and Value.
* Add well_known_type field in upb_msgdef to specify type of well known messages.
* Remove comma at end of enum definition.
* Group number wrappers
* Fix comments
* Refactoring to use is_wellknown_{msg/field}
6 years ago
Josh Haberman
b79fd65a83
WIP.
6 years ago
Joshua Haberman
4271689953
Merge pull request #125 from haberman/portdef
...
Fixed port_def/undef so that the amalgamation is self-contained.
6 years ago
Josh Haberman
ae4c03b93c
Fixed port_def/undef so that the amalgamation is self-contained.
6 years ago
Joshua Haberman
b2a388212a
Merge pull request #124 from haberman/unknown
...
Added support for unknown fields to upb_msg.
6 years ago
Josh Haberman
950d7a9530
Fixed warnings.
6 years ago
Josh Haberman
a105c015b1
Added support for unknown fields to upb_msg.
...
After this CL, upb passes all existing proto3 conformance tests.
However the conformance suite is missing a lot of cases and should
be fleshed out.
6 years ago
Joshua Haberman
ea19fa4ed6
Merge pull request #123 from haberman/rmdefault
...
Removed default instance and oneof array from tables.
6 years ago
Josh Haberman
b290a5dd65
Disabled another Lua test for the time being.
6 years ago
Josh Haberman
a4db175929
Removed unnecessary struct definition with "int a".
6 years ago
Josh Haberman
4a7bc85d72
Fixed some c89 errors.
6 years ago
Josh Haberman
340bd01338
Removed default instance and oneof array from tables.
6 years ago
Josh Haberman
3d511104ac
Updated protobuf submodule.
6 years ago
Joshua Haberman
ef1246d87c
Merge pull request #121 from haberman/minimize
...
Changed C API to only define structs, a table, and a few minimal inline function.
6 years ago
Joshua Haberman
bdbc9fbd6d
Merge pull request #122 from TeBoring/json-values
...
Fix json parsing for Struct, ListValue and Value.
6 years ago
Joshua Haberman
3a37b91532
Fixed amalgamation.
6 years ago
Joshua Haberman
ba03d65a8f
Removed unused variable.
6 years ago
Joshua Haberman
1d4957a9a6
Removed unused parameter.
6 years ago
Joshua Haberman
287ab94800
A few more compile fixes.
6 years ago
Joshua Haberman
33d1231ead
Added port_def.inc and port_undef.inc.
6 years ago
Joshua Haberman
f7713ebc39
Changed C API to use inline functions and computed offsets.
6 years ago
Bo Yang
81fbb4ffa7
Initialize value
6 years ago
Bo Yang
6c910330c4
Fix json parsing for Struct, ListValue and Value.
6 years ago
Joshua Haberman
694d51f4d6
Changed C API to only define structs, a table, and a few minimal inline functions.
6 years ago
Joshua Haberman
41379a7064
Merge pull request #120 from haberman/cmake
...
More work on CMake.
6 years ago
Joshua Haberman
b6a92a93c6
More work on CMake build, and updated conformance for proto3.
6 years ago
Paul Yang
6c4469e189
Fix json encoding/decoding for duration. ( #118 )
...
* Fix json encoding/decoding for duration.
* Use lld for int64_t
* Cast int64_t to long
6 years ago
Joshua Haberman
b7cad62b5f
Got CMake build working on macOS, and updated CMake build.
6 years ago
Joshua Haberman
62318cadce
Merge pull request #119 from rohitsakala/master
...
Bugfix for bigendian platforms by casting size_t to unint32_t
6 years ago
Sakala Venkata Krishna Rohit
4473585734
Merge branch 'master' of https://github.com/rohitsakala/upb
6 years ago
Sakala Venkata Krishna Rohit
898f640e65
Bugfix on bigendianess by casting size_t to unint32_t
...
The reason for typecasting size_t to unint32_t is that size_t is 8 bytes and uint32_t is only 4 bytes.
If not typecasted Memcpy fails to copy the *correct* four bytes in big endian platforms.
6 years ago
Sakala Venkata Krishna Rohit
6522ae4fb3
Bugfix on bigendianess by casting size_t to unint32_t
...
The reason for typecasting size_t to unint32_t is that size_t is 8 bytes and uint32_t is only 4 bytes.
If not typecasted Memcpy fails to copy the *correct* four bytes in big endian platforms.
6 years ago
Paul Yang
38d674e86f
Fix json parsing for timestamp ( #115 )
...
* Fix json parsing for timestamp
* Fix json encoding for timestamp
* Implement timestamp_machine to parse timestamp
* Remove comparision for size_t and 0
* Increase defined printer size
* Increase size
* Increase parser size
* Mark json_en_timestamp_machine unused
6 years ago
Joshua Haberman
d1738d4dec
Merge pull request #117 from haberman/cmake
...
Moved upb_msg parts that depend on def to a separate msgfactory.{c,h}.
6 years ago
Josh Haberman
e94ac4f757
Moved upb_msg parts that depend on def to a separate msgfactory.{c,h}.
...
Also got rid of the premature "v1" business that was attempting
to create a binary compatibility story.
Also added an in-progress CMakeLists.txt file.
6 years ago
gerben-s
0a95f73d0d
Merge pull request #116 from haberman/rmgooglepb
...
Removed a bunch of obsolete code.
6 years ago
Josh Haberman
6155ed8b49
Re-add amalgamation rules and remove google protobuf from Travis.
6 years ago
Josh Haberman
1a484d353b
Re-add upb/bindings/stdc++/string.h, which is still used in tests.
6 years ago
Josh Haberman
c0a50de923
Removed a bunch of obsolete code.
...
A lot of this code was experimental or temporarily
useful, but is no longer needed.
6 years ago
Joshua Haberman
e3eae33fb5
Merge pull request #114 from haberman/arenaonly
...
Enforced that upb_msg lives in an Arena only, and other simplifying.
6 years ago
Joshua Haberman
636b25be8d
Re-add msg handlers to the .c file also.
6 years ago
Joshua Haberman
7059be68ae
Re-add message handlers to upb/handlers.*.
...
These are still being used by the proto2 bindings.
6 years ago
Joshua Haberman
c8f6a27e6b
Enforced that upb_msg lives in an Arena only, and other simplifying.
...
upb_msg was trying to be general enough that it could either live in
an arena or be allocated with malloc()/free(). This was too much
complexity for too little benefit. We should commit to just saying
that upb_msg is arena-only.
I also ripped out the code to glue upb_msg to the existing
handlers-based encoder/decoder. upb_msg has its own, small, simple
encoder/decoder. I'm trying to whittle down upb_msg to a small
and simple core.
I updated the Lua extension for these changes. Lua needs some more
work to properly create arenas per message. For now I just created
a single global arena.
6 years ago
Joshua Haberman
b0a6602fc8
Merge pull request #113 from TeBoring/json-wrapper
...
Support json parsing for wrapper values
6 years ago
Bo Yang
a8d1a5933d
Use special eof char to mark end of parsing
6 years ago
Bo Yang
d4caefaade
Move logic away from ragel machine
6 years ago
Bo Yang
f1d7570f30
Remove unused code
6 years ago
Bo Yang
ac9d4468f5
Make value top level
6 years ago
Bo Yang
ae2f1cdb17
Mark unused variable
6 years ago