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 Adam Klama <klama.adam@gmail.com> 64 Anton Matosov <amatosov@roblox.com> 65 berni155 <bdkrae@gmail.com> 66 - bolind <bolind@users.noreply.github.com> 67 David Lin <dtwlin@google.com> 68 - dch <david.hotham@blueyonder.co.uk> 69 devjoa <devjoa@gmail.com> 70 Evan Fisher <schleb@gmail.com> 71 Fay <fay2003hiend@gmail.com> ··· 100 Matthew Simmons <simmonmt@acm.org> 101 Anthony Pesch <inolen@gmail.com> 102 Avik De <avikde@gmail.com> 103 - ConradWood <github@conradwood.net> 104 David Sabatie <david.sabatie@notrenet.com> 105 Sebastian Stockhammer <sebastian.stockhammer@rosenberger.de> 106 Gil Shapira <gil.shapira@intusurg.com> ··· 114 Pavel Sokolov <pavel@sokolov.me> 115 Slavey Karadzhov <slav@attachix.com> 116 Tobias Nießen <tniessen@tnie.de>
··· 63 Adam Klama <klama.adam@gmail.com> 64 Anton Matosov <amatosov@roblox.com> 65 berni155 <bdkrae@gmail.com> 66 David Lin <dtwlin@google.com> 67 devjoa <devjoa@gmail.com> 68 Evan Fisher <schleb@gmail.com> 69 Fay <fay2003hiend@gmail.com> ··· 98 Matthew Simmons <simmonmt@acm.org> 99 Anthony Pesch <inolen@gmail.com> 100 Avik De <avikde@gmail.com> 101 + Conrad Wood <github@conradwood.net> 102 David Sabatie <david.sabatie@notrenet.com> 103 Sebastian Stockhammer <sebastian.stockhammer@rosenberger.de> 104 Gil Shapira <gil.shapira@intusurg.com> ··· 112 Pavel Sokolov <pavel@sokolov.me> 113 Slavey Karadzhov <slav@attachix.com> 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 66 /* Version of the nanopb library. Just in case you want to check it in 67 * your own program. */ 68 - #define NANOPB_VERSION "nanopb-0.4.7-dev" 69 70 /* Include all the system headers needed by nanopb. You will need the 71 * definitions of the following: ··· 177 # define PB_STATIC_ASSERT_MSG_(MSG, LINE, COUNTER) pb_static_assertion_##MSG##_##LINE##_##COUNTER 178 # elif defined(__cplusplus) 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 # define PB_STATIC_ASSERT(COND,MSG) static_assert(COND,#MSG); 184 # else 185 /* C11 standard _Static_assert mechanism */ ··· 905 #define PB_INLINE_CONSTEXPR PB_CONSTEXPR 906 #endif // __cplusplus >= 201703L 907 908 namespace nanopb { 909 // Each type will be partially specialized by the generator. 910 template <typename GenMessageT> struct MessageDescriptor; 911 } // namespace nanopb 912 #endif /* __cplusplus */ 913 914 #endif
··· 65 66 /* Version of the nanopb library. Just in case you want to check it in 67 * your own program. */ 68 + #define NANOPB_VERSION "nanopb-0.4.7" 69 70 /* Include all the system headers needed by nanopb. You will need the 71 * definitions of the following: ··· 177 # define PB_STATIC_ASSERT_MSG_(MSG, LINE, COUNTER) pb_static_assertion_##MSG##_##LINE##_##COUNTER 178 # elif defined(__cplusplus) 179 /* C++11 standard static_assert mechanism */ 180 # define PB_STATIC_ASSERT(COND,MSG) static_assert(COND,#MSG); 181 # else 182 /* C11 standard _Static_assert mechanism */ ··· 902 #define PB_INLINE_CONSTEXPR PB_CONSTEXPR 903 #endif // __cplusplus >= 201703L 904 905 + extern "C++" 906 + { 907 namespace nanopb { 908 // Each type will be partially specialized by the generator. 909 template <typename GenMessageT> struct MessageDescriptor; 910 } // namespace nanopb 911 + } 912 #endif /* __cplusplus */ 913 914 #endif
+12 -1
src/external/nanopb/pb_decode.c
··· 111 return false; 112 #endif 113 114 - stream->bytes_left -= count; 115 return true; 116 } 117 ··· 1326 { 1327 pb_release_single_field(&iter); 1328 } while (pb_field_iter_next(&iter)); 1329 } 1330 #endif 1331
··· 111 return false; 112 #endif 113 114 + if (stream->bytes_left < count) 115 + stream->bytes_left = 0; 116 + else 117 + stream->bytes_left -= count; 118 + 119 return true; 120 } 121 ··· 1330 { 1331 pb_release_single_field(&iter); 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); 1340 } 1341 #endif 1342
-6
src/external/nanopb/pb_decode.h
··· 107 #define pb_decode_delimited_noinit(s,f,d) pb_decode_ex(s,f,d, PB_DECODE_DELIMITED | PB_DECODE_NOINIT) 108 #define pb_decode_nullterminated(s,f,d) pb_decode_ex(s,f,d, PB_DECODE_NULLTERMINATED) 109 110 - #ifdef PB_ENABLE_MALLOC 111 /* Release any allocated pointer fields. If you use dynamic allocation, you should 112 * call this for any successfully decoded message when you are done with it. If 113 * pb_decode() returns with an error, the message is already released. 114 */ 115 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 122 /************************************** 123 * Functions for manipulating streams *
··· 107 #define pb_decode_delimited_noinit(s,f,d) pb_decode_ex(s,f,d, PB_DECODE_DELIMITED | PB_DECODE_NOINIT) 108 #define pb_decode_nullterminated(s,f,d) pb_decode_ex(s,f,d, PB_DECODE_NULLTERMINATED) 109 110 /* Release any allocated pointer fields. If you use dynamic allocation, you should 111 * call this for any successfully decoded message when you are done with it. If 112 * pb_decode() returns with an error, the message is already released. 113 */ 114 void pb_release(const pb_msgdesc_t *fields, void *dest_struct); 115 116 /************************************** 117 * Functions for manipulating streams *