Added -std=gnu99 for fastdecode and ran Buildifier.

pull/13171/head
Joshua Haberman 4 years ago
parent b928696942
commit efd576b698
  1. 17
      BUILD
  2. 6
      cmake/CMakeLists.txt
  3. 3
      upb/decode_fast.c

17
BUILD

@ -77,19 +77,26 @@ cc_library(
],
copts = UPB_DEFAULT_COPTS,
visibility = ["//visibility:public"],
deps = [":port", ":fastdecode"],
deps = [
":fastdecode",
":port",
],
)
cc_library(
name = "fastdecode",
srcs = [
"upb/decode.int.h",
"upb/decode_fast.c",
"upb/decode_fast.h",
"upb/decode.int.h",
"upb/msg.h",
"upb/upb.int.h",
],
deps = [":port", ":table"],
copts = ["-std=gnu99"],
deps = [
":port",
":table",
],
)
# Common support routines used by generated code. This library has no
@ -188,8 +195,8 @@ cc_library(
cc_library(
name = "table",
hdrs = [
"upb/table.int.h",
"upb/upb.h",
"upb/table.int.h",
"upb/upb.h",
],
visibility = ["//tests:__pkg__"],
deps = [

@ -77,12 +77,12 @@ add_library(upb
../upb/upb.h
../upb/upb.hpp)
target_link_libraries(upb
port
fastdecode)
fastdecode
port)
add_library(fastdecode
../upb/decode.int.h
../upb/decode_fast.c
../upb/decode_fast.h
../upb/decode.int.h
../upb/msg.h
../upb/upb.int.h)
target_link_libraries(fastdecode

@ -77,9 +77,10 @@ static bool fastdecode_checktag(uint64_t data, int tagbytes) {
UPB_FORCEINLINE
static const char *fastdecode_longsize(const char *ptr, int *size) {
int i;
UPB_ASSERT(*size & 0x80);
*size &= 0xff;
for (int i = 0; i < 3; i++) {
for (i = 0; i < 3; i++) {
ptr++;
size_t byte = (uint8_t)ptr[-1];
*size += (byte - 1) << (7 + 7 * i);

Loading…
Cancel
Save