mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-28 02:11:43 +00:00
libprotobuf is a very annoying dependency to deal with, and with the switch to nanopb for generated C++ code, libprotobuf is only used for dynamic decode in the GUI apps. libprotobuf has been swapped out with upb, a much smaller C-based library that supports reflection and can therefore do dynamic decode. This means we can remove the libprotobuf dependency and stop dealing with build issues because of it.
24 lines
887 B
Diff
24 lines
887 B
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Gold856 <117957790+Gold856@users.noreply.github.com>
|
|
Date: Mon, 26 May 2025 01:34:57 -0400
|
|
Subject: [PATCH 4/5] Cast key to uint64_t before doing a bit shift This fixes
|
|
compilation on Win32
|
|
|
|
---
|
|
upb/hash/common.c | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/upb/hash/common.c b/upb/hash/common.c
|
|
index ca0e488689e9cc54d143f505484497654d0f8c03..26c731764ce08f4e3f12900821fd1ebd1798da27 100644
|
|
--- a/upb/hash/common.c
|
|
+++ b/upb/hash/common.c
|
|
@@ -95,7 +95,7 @@ typedef bool eqlfunc_t(upb_key k1, lookupkey_t k2);
|
|
|
|
static uint32_t upb_inthash(uintptr_t key) {
|
|
if (sizeof(uintptr_t) == 8) {
|
|
- return (uint32_t)key ^ (uint32_t)(key >> 32);
|
|
+ return (uint32_t)key ^ (uint32_t)((uint64_t)(key) >> 32);
|
|
} else {
|
|
UPB_ASSERT(sizeof(uintptr_t) == 4);
|
|
return (uint32_t)key;
|