OLD | NEW |
(Empty) | |
| 1 unchanged: |
| 2 --- protobuf-cleaned/src/google/protobuf/stubs/once.cc 2015-12-30 13:21:46.0000
00000 -0800 |
| 3 +++ protobuf-patched/src/google/protobuf/stubs/once.cc 2016-03-31 13:25:32.1800
17848 -0700 |
| 4 @@ -62,6 +62,13 @@ |
| 5 |
| 6 } // namespace |
| 7 |
| 8 +void GoogleOnceInit(ProtobufOnceType* once, void (*init_func)()) { |
| 9 + if (internal::Acquire_Load(once) != ONCE_STATE_DONE) { |
| 10 + internal::FunctionClosure0 func(init_func, false); |
| 11 + GoogleOnceInitImpl(once, &func); |
| 12 + } |
| 13 +} |
| 14 + |
| 15 void GoogleOnceInitImpl(ProtobufOnceType* once, Closure* closure) { |
| 16 internal::AtomicWord state = internal::Acquire_Load(once); |
| 17 // Fast path. The provided closure was already executed. |
| 18 only in patch2: |
| 19 unchanged: |
| 20 --- protobuf-cleaned/src/google/protobuf/stubs/once.h 2015-12-30 13:21:46.0000
00000 -0800 |
| 21 +++ protobuf-patched/src/google/protobuf/stubs/once.h 2016-03-31 13:25:35.5200
13490 -0700 |
| 22 @@ -122,12 +122,8 @@ |
| 23 LIBPROTOBUF_EXPORT |
| 24 void GoogleOnceInitImpl(ProtobufOnceType* once, Closure* closure); |
| 25 |
| 26 -inline void GoogleOnceInit(ProtobufOnceType* once, void (*init_func)()) { |
| 27 - if (internal::Acquire_Load(once) != ONCE_STATE_DONE) { |
| 28 - internal::FunctionClosure0 func(init_func, false); |
| 29 - GoogleOnceInitImpl(once, &func); |
| 30 - } |
| 31 -} |
| 32 +LIBPROTOBUF_EXPORT |
| 33 +void GoogleOnceInit(ProtobufOnceType* once, void (*init_func)()); |
| 34 |
| 35 template <typename Arg> |
| 36 inline void GoogleOnceInit(ProtobufOnceType* once, void (*init_func)(Arg*), |
OLD | NEW |