Mike Kruskal
17b6451684
Bumping protobuf dependency to newer commit
...
PiperOrigin-RevId: 460811319
2 years ago
Eric Salo
eb66ab601f
update upb_Encode() to use arena api internally
...
PiperOrigin-RevId: 460758866
2 years ago
Eric Salo
c2c6427f60
upb: fix NULL pointer bug in Python FFI
...
Reference: https://github.com/protocolbuffers/protobuf/issues/10208
PiperOrigin-RevId: 460623221
2 years ago
Eric Salo
9b3e87307d
upb: upb_EnumDefs are now built using mini descriptors
...
Added upb_EnumDef_IsSorted() as an optimization for presorted enum protos
PiperOrigin-RevId: 460564949
2 years ago
Eric Salo
3c295eccf9
clean up the mini descriptor code:
...
- Correctly set the modifier field for MessageDefs
- Add error handling
- Respect the provided arena, stop hardwiring the global alloc
- upb_MiniDescriptor_EncodeExtension() is now upb_MiniDescriptor_EncodeField()
- Make the plugin code a lot easier to read
PiperOrigin-RevId: 460482002
2 years ago
Eric Salo
410143b265
split out some unicode logic from the json decoder
...
Also fixed a bug in the json decoder which caused it to break on a code point value of exactly 0x10ffff
PiperOrigin-RevId: 459856813
2 years ago
Protobuf Team Bot
201a79071a
Update C++ generator.
...
PiperOrigin-RevId: 459633873
2 years ago
Joshua Haberman
f96b569eb3
Fixes a few bugs in the descriptor mapping containers.
...
1. `for x in mapping` now yields keys rather than values, to match Python conventions and the behavior of the old library.
2. Lookup operations now correctly reject unhashable types as map keys.
3. We implement `repr()` to use the same format as `dict`
PiperOrigin-RevId: 459491734
2 years ago
Protobuf Team Bot
ec110d9aaa
Remove SortedEnums from generator which is now in file_layout.h/cc.
...
PiperOrigin-RevId: 459348088
2 years ago
Protobuf Team Bot
ff46379efe
Prepare build for C++ generator.
...
PiperOrigin-RevId: 459265699
2 years ago
Protobuf Team Bot
1c13fd0686
first stab at a ZeroCopyStream api.
...
These functions are not yet part of the upb build but this is a good chunk of
work so let's snapshot it now.
PiperOrigin-RevId: 459156286
2 years ago
Mike Kruskal
cce085b7e7
Internal changes
...
PiperOrigin-RevId: 458517045
2 years ago
Protobuf Team Bot
8c44f04697
create and lock down upb/internal/array.h
...
Internal array functions are now implemented in upb/internal/array.c and declared in
upb/internal/array.h, which only has local visibility.
PiperOrigin-RevId: 458260144
2 years ago
Protobuf Team Bot
46e306bead
Move generator shared support code to common target.
...
PiperOrigin-RevId: 458257330
2 years ago
Joshua Haberman
125db89ff5
Added fuzz tests for mini table building and binary format parsing/serialization.
...
PiperOrigin-RevId: 458240180
2 years ago
Protobuf Team Bot
d44834063a
Add UPB_DEPRECATED macro to use for deprecated field code generation.
...
PiperOrigin-RevId: 457996196
2 years ago
Joshua Haberman
16daf910cc
Fixed Python+upb to use ScalarMapContainer when appropriate.
...
PiperOrigin-RevId: 457980556
2 years ago
Protobuf Team Bot
b6f862bf9f
Fix message clear not updating hasbit when message/group has presence. Add more tests.
...
PiperOrigin-RevId: 457822583
2 years ago
Protobuf Team Bot
da82d15714
Mark arena getter const.
...
PiperOrigin-RevId: 457763772
2 years ago
Copybara-Service
34ee951c19
Merge pull request #658 from cmburn:main
...
PiperOrigin-RevId: 457738277
2 years ago
Protobuf Team Bot
49876f4633
Update sample of using upb_MtDataEncoder
...
PiperOrigin-RevId: 457501667
2 years ago
Protobuf Team Bot
0c78048723
clean the fences for the headers:
...
some headers were not including port_def.inc
some headers were not declaring extern "C"
some headers were backing out of the above in the wrong order
PiperOrigin-RevId: 457391878
2 years ago
Protobuf Team Bot
ca08ff5b74
lock down upb/internal/decode.h
...
PiperOrigin-RevId: 457116753
2 years ago
Protobuf Team Bot
033859ff5d
rename internal/upb.h as internal/encode.h
...
add build target for upb/internal/encode.h and lock down its visibility
PiperOrigin-RevId: 457087638
2 years ago
Protobuf Team Bot
15596be402
move table.c into upb/internal
...
PiperOrigin-RevId: 457044228
2 years ago
Protobuf Team Bot
7975945e61
clean up the dependency graph some more
...
PiperOrigin-RevId: 456890270
2 years ago
Protobuf Team Bot
1695cb2788
rename the upb_Array 'len' field as 'size'
...
Now that 'size' has been renamed as 'capacity' we are free to rename 'len' as
'size', so upb_Array_Size() is actually returning the 'size' field.
PiperOrigin-RevId: 456865972
2 years ago
Protobuf Team Bot
e153b52394
split out upb_StringView from upb.h
...
PiperOrigin-RevId: 456858455
2 years ago
Protobuf Team Bot
8d0d13f2bc
Fix the dependency chain for internal/arena.h
...
Clean up a few other superfluous #include's and forward declarations
PiperOrigin-RevId: 456851942
2 years ago
Protobuf Team Bot
83f4988561
rename the upb_Array 'size' field as 'capacity'
...
The current field/function names for upb_Array are quite confusing.
We will fix them in two steps, this being the first step.
PiperOrigin-RevId: 456687224
2 years ago
Protobuf Team Bot
a6cbda7b7b
remove redundant declaration from generated code
...
It turns out that forward-declaring:
struct foo;
is redundant when combined with:
typedef struct foo foo;
Which is exactly what we were doing in the generated upb code. So, simplify it!
PiperOrigin-RevId: 456590031
2 years ago
Protobuf Team Bot
b174d9d5a0
split out the internal arena defs from internal/upb.h
...
PiperOrigin-RevId: 456584853
2 years ago
Protobuf Team Bot
7b05f25b98
split out the alloc code from the arena code
...
PiperOrigin-RevId: 456531002
2 years ago
Protobuf Team Bot
d2177912c7
Internal change
...
PiperOrigin-RevId: 456338456
2 years ago
Protobuf Team Bot
e4635f223e
match file names to type names
...
Lots of changes but it's all just moving things around.
Backward-compatible stub #include's have been provided for now.
upb_Arena/upb_Status have been split out from upb/upb.?
upb_Array/upb_Map/upb_MessageValue have been split out from upb/collections.?
upb_ExtensionRegistry has been split out from upb/msg.?
upb/decode_internal.h is now upb/internal/decode.h
upb/mini_table_accessors_internal.h is now upb/internal/mini_table_accessors.h
upb/table_internal.h is now upb/internal/table.h
upb/upb_internal.h is now upb/internal/upb.h
PiperOrigin-RevId: 456297617
2 years ago
Protobuf Team Bot
97993b219d
rename upb::SymbolTable as upb::DefPool
...
PiperOrigin-RevId: 456147709
2 years ago
Charlie Burnett
254f27c874
Remove duplicate function prototype
2 years ago
Protobuf Team Bot
88047d90ba
update benchmark.cc from v7 to v11 of the google ads proto
...
PiperOrigin-RevId: 455675163
2 years ago
Protobuf Team Bot
65bde4e75b
upb_Encode() now returns a status value
...
PiperOrigin-RevId: 454740100
2 years ago
Protobuf Team Bot
65cd34dd00
The mini descriptor encoder now uses the internal api (upb_MessageDef, upb_FileDef, etc) instead of dealing directly with the proto fields. So much simpler and cleaner!
...
PiperOrigin-RevId: 454389613
2 years ago
Protobuf Team Bot
bb38fc9c4d
First implementation of protoc-gen-upbdev plugin
...
PiperOrigin-RevId: 454243195
2 years ago
Protobuf Team Bot
6e1aa9f136
add json encoder option to render enums as ints
...
PiperOrigin-RevId: 453724657
3 years ago
Protobuf Team
e5f2601836
use constraints values in @platforms instead of @bazel_tools//platforms https://github.com/bazelbuild/bazel/issues/8622
...
PiperOrigin-RevId: 452387904
3 years ago
Joshua Haberman
4ffeaa6a58
Fixed Python Tests by disabling the numpy test for now.
...
PiperOrigin-RevId: 452357087
3 years ago
Protobuf Team
ba18b21b01
Allow GetMessage API to be used for Groups.
...
PiperOrigin-RevId: 452208245
3 years ago
Protobuf Team
b28d80a9cc
Fix GetMutableMessage not updating presence and storing new instance.
...
Add array resize API to support GetMutableRepeatedField api with size argument.
PiperOrigin-RevId: 452075516
3 years ago
Protobuf Team
c205f2f8aa
strtable keys are no longer required to be NULL-terminated so update the comments
...
PiperOrigin-RevId: 451802147
3 years ago
Protobuf Team
04cb5af6b6
Fix segmentation fault in python upb when instantiating field via repeated field assignment
...
PiperOrigin-RevId: 451406772
3 years ago
Protobuf Team
ef78b6a093
Update py_wheels metadata
...
PiperOrigin-RevId: 451204458
3 years ago
Joshua Haberman
6df5517d25
Consolidate upb visibility into a single visibility list.
...
PiperOrigin-RevId: 450733238
3 years ago