The open source OpenXR runtime

external/nanopb: Update nanopb from upstream nanopb-0.4.7

GitOrigin-RevId: b97aa657a706d3ba4a9a6ccca7043c9d6fe41cba

authored by

Ryan Pavlik and committed by
Jakob Bornecrantz
a7b9c7b6 83385995

+27 -15
+10 -3
src/external/nanopb/AUTHORS.txt
··· 63 63 Adam Klama <klama.adam@gmail.com> 64 64 Anton Matosov <amatosov@roblox.com> 65 65 berni155 <bdkrae@gmail.com> 66 - bolind <bolind@users.noreply.github.com> 67 66 David Lin <dtwlin@google.com> 68 - dch <david.hotham@blueyonder.co.uk> 69 67 devjoa <devjoa@gmail.com> 70 68 Evan Fisher <schleb@gmail.com> 71 69 Fay <fay2003hiend@gmail.com> ··· 100 98 Matthew Simmons <simmonmt@acm.org> 101 99 Anthony Pesch <inolen@gmail.com> 102 100 Avik De <avikde@gmail.com> 103 - ConradWood <github@conradwood.net> 101 + Conrad Wood <github@conradwood.net> 104 102 David Sabatie <david.sabatie@notrenet.com> 105 103 Sebastian Stockhammer <sebastian.stockhammer@rosenberger.de> 106 104 Gil Shapira <gil.shapira@intusurg.com> ··· 114 112 Pavel Sokolov <pavel@sokolov.me> 115 113 Slavey Karadzhov <slav@attachix.com> 116 114 Tobias Nießen <tniessen@tnie.de> 115 + Christian Balcom <robot.inventor@gmail.com> 116 + Christopher Hughes <67643395+chughes-pika@users.noreply.github.com> 117 + Greg Balke <gbalke@berkeley.edu> 118 + Jussi Keränen <jussike@gmail.com> 119 + Krzysztof Rosinski <krzysiek@jrdltd.co.uk> 120 + Nathaniel Brough <nathaniel.brough@gmail.com> 121 + Sean Kahler <itsbattledash@gmail.com> 122 + Valerii Koval <valeros@users.noreply.github.com> 123 + Gediminas Žukaitis <gediminas.zukaitis@protonmail.com>
+1 -1
src/external/nanopb/COMMIT.txt
··· 1 - nanopb-0.4.6-20-g23993cf 1 + nanopb-0.4.7
+4 -4
src/external/nanopb/pb.h
··· 65 65 66 66 /* Version of the nanopb library. Just in case you want to check it in 67 67 * your own program. */ 68 - #define NANOPB_VERSION "nanopb-0.4.7-dev" 68 + #define NANOPB_VERSION "nanopb-0.4.7" 69 69 70 70 /* Include all the system headers needed by nanopb. You will need the 71 71 * definitions of the following: ··· 177 177 # define PB_STATIC_ASSERT_MSG_(MSG, LINE, COUNTER) pb_static_assertion_##MSG##_##LINE##_##COUNTER 178 178 # elif defined(__cplusplus) 179 179 /* C++11 standard static_assert mechanism */ 180 - # define PB_STATIC_ASSERT(COND,MSG) static_assert(COND,#MSG); 181 - # elif defined(_MSC_VER) 182 - /* Required to work on MSVC */ 183 180 # define PB_STATIC_ASSERT(COND,MSG) static_assert(COND,#MSG); 184 181 # else 185 182 /* C11 standard _Static_assert mechanism */ ··· 905 902 #define PB_INLINE_CONSTEXPR PB_CONSTEXPR 906 903 #endif // __cplusplus >= 201703L 907 904 905 + extern "C++" 906 + { 908 907 namespace nanopb { 909 908 // Each type will be partially specialized by the generator. 910 909 template <typename GenMessageT> struct MessageDescriptor; 911 910 } // namespace nanopb 911 + } 912 912 #endif /* __cplusplus */ 913 913 914 914 #endif
+12 -1
src/external/nanopb/pb_decode.c
··· 111 111 return false; 112 112 #endif 113 113 114 - stream->bytes_left -= count; 114 + if (stream->bytes_left < count) 115 + stream->bytes_left = 0; 116 + else 117 + stream->bytes_left -= count; 118 + 115 119 return true; 116 120 } 117 121 ··· 1326 1330 { 1327 1331 pb_release_single_field(&iter); 1328 1332 } while (pb_field_iter_next(&iter)); 1333 + } 1334 + #else 1335 + void pb_release(const pb_msgdesc_t *fields, void *dest_struct) 1336 + { 1337 + /* Nothing to release without PB_ENABLE_MALLOC. */ 1338 + PB_UNUSED(fields); 1339 + PB_UNUSED(dest_struct); 1329 1340 } 1330 1341 #endif 1331 1342
-6
src/external/nanopb/pb_decode.h
··· 107 107 #define pb_decode_delimited_noinit(s,f,d) pb_decode_ex(s,f,d, PB_DECODE_DELIMITED | PB_DECODE_NOINIT) 108 108 #define pb_decode_nullterminated(s,f,d) pb_decode_ex(s,f,d, PB_DECODE_NULLTERMINATED) 109 109 110 - #ifdef PB_ENABLE_MALLOC 111 110 /* Release any allocated pointer fields. If you use dynamic allocation, you should 112 111 * call this for any successfully decoded message when you are done with it. If 113 112 * pb_decode() returns with an error, the message is already released. 114 113 */ 115 114 void pb_release(const pb_msgdesc_t *fields, void *dest_struct); 116 - #else 117 - /* Allocation is not supported, so release is no-op */ 118 - #define pb_release(fields, dest_struct) PB_UNUSED(fields); PB_UNUSED(dest_struct); 119 - #endif 120 - 121 115 122 116 /************************************** 123 117 * Functions for manipulating streams *