Skip to content

Commit

Permalink
Amalgamation no longer bundles wyhash, but #includes it.
Browse files Browse the repository at this point in the history
Also fixed a few spelling mistakes.
  • Loading branch information
haberman committed Nov 2, 2020
1 parent a2a4079 commit 64abb5e
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 8 deletions.
16 changes: 13 additions & 3 deletions BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,10 @@ upb_amalgamation(

cc_library(
name = "amalgamation",
srcs = ["upb.c"],
srcs = [
"upb.c",
"third_party/wyhash/wyhash.h",
],
hdrs = ["upb.h"],
copts = UPB_DEFAULT_COPTS,
)
Expand All @@ -314,9 +317,13 @@ upb_amalgamation(

cc_library(
name = "php_amalgamation",
srcs = ["php-upb.c"],
srcs = [
"php-upb.c",
"third_party/wyhash/wyhash.h",
],
hdrs = ["php-upb.h"],
copts = UPB_DEFAULT_COPTS,

)

upb_amalgamation(
Expand All @@ -338,7 +345,10 @@ upb_amalgamation(

cc_library(
name = "ruby_amalgamation",
srcs = ["ruby-upb.c"],
srcs = [
"ruby-upb.c",
"third_party/wyhash/wyhash.h",
],
hdrs = ["ruby-upb.h"],
copts = UPB_DEFAULT_COPTS,
)
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/benchmark.cc
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ static void BM_LoadDescriptor_Upb(benchmark::State& state) {
google_protobuf_DescriptorProto_getmsgdef(symtab.ptr());
bytes_per_iter = _upb_symtab_bytesloaded(symtab.ptr());
}
state.SetBytesProcessed(state.iterations() * descriptor.size);
state.SetBytesProcessed(state.iterations() * bytes_per_iter);
}
BENCHMARK(BM_LoadDescriptor_Upb);

Expand Down
2 changes: 1 addition & 1 deletion tests/bindings/lua/test_upb.lua
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ function test_utf8()
upb.decode(test_messages_proto3.TestAllTypesProto3, serialized)
end)

-- TOOD(haberman): should proto3 accessors also check UTF-8 at set time?
-- TODO(haberman): should proto3 accessors also check UTF-8 at set time?
end

function test_string_double_map()
Expand Down
2 changes: 1 addition & 1 deletion tools/amalgamate.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def _process_include(self, line, outfile):
include = parse_include(line)
if not include:
return False
if not (include.startswith("upb") or include.startswith("google") or include.startswith("third_party")):
if not (include.startswith("upb") or include.startswith("google")):
return False
if include.endswith("hpp"):
# Skip, we don't support the amalgamation from C++.
Expand Down
2 changes: 1 addition & 1 deletion upb/json_encode.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ extern "C" {
#endif

enum {
/* When set, emits 0/default values. TOOD(haberman): proto3 only? */
/* When set, emits 0/default values. TODO(haberman): proto3 only? */
UPB_JSONENC_EMITDEFAULTS = 1,

/* When set, use normal (snake_caes) field names instead of JSON (camelCase)
Expand Down
2 changes: 1 addition & 1 deletion upb/table.int.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
** store pointers or integers of at least 32 bits (upb isn't really useful on
** systems where sizeof(void*) < 4).
**
** The table must be homogenous (all values of the same type). In debug
** The table must be homogeneous (all values of the same type). In debug
** mode, we check this on insert and lookup.
*/

Expand Down

0 comments on commit 64abb5e

Please sign in to comment.