diff options
author | Josh Haberman <jhaberman@gmail.com> | 2018-09-04 10:58:54 -0700 |
---|---|---|
committer | Josh Haberman <jhaberman@gmail.com> | 2018-09-04 10:58:54 -0700 |
commit | d61aede89cf188367766b971f59cf57d7835d8e8 (patch) | |
tree | a19842c62c3c8f51389912ecafdf932d0a572bea /src/google/protobuf/stubs/callback.h | |
parent | 45d03a977193d1dcce5251e4bffe17bf0ba738ec (diff) | |
download | protobuf-d61aede89cf188367766b971f59cf57d7835d8e8.tar.gz protobuf-d61aede89cf188367766b971f59cf57d7835d8e8.tar.bz2 protobuf-d61aede89cf188367766b971f59cf57d7835d8e8.zip |
Down-integrate from google3.
Diffstat (limited to 'src/google/protobuf/stubs/callback.h')
-rw-r--r-- | src/google/protobuf/stubs/callback.h | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/src/google/protobuf/stubs/callback.h b/src/google/protobuf/stubs/callback.h index dae972f2..7cce4426 100644 --- a/src/google/protobuf/stubs/callback.h +++ b/src/google/protobuf/stubs/callback.h @@ -5,6 +5,8 @@ #include <google/protobuf/stubs/macros.h> +#include <google/protobuf/port_def.inc> + // =================================================================== // emulates google3/base/callback.h @@ -68,7 +70,7 @@ namespace protobuf { // string my_str; // NewCallback(&Foo, my_str); // WON'T WORK: Can't use referecnes. // However, correctly-typed pointers will work just fine. -class LIBPROTOBUF_EXPORT Closure { +class PROTOBUF_EXPORT Closure { public: Closure() {} virtual ~Closure(); @@ -91,8 +93,8 @@ class ResultCallback { GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(ResultCallback); }; -template<typename R, typename A1> -class LIBPROTOBUF_EXPORT ResultCallback1 { +template <typename R, typename A1> +class PROTOBUF_EXPORT ResultCallback1 { public: ResultCallback1() {} virtual ~ResultCallback1() {} @@ -103,8 +105,8 @@ class LIBPROTOBUF_EXPORT ResultCallback1 { GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(ResultCallback1); }; -template<typename R, typename A1, typename A2> -class LIBPROTOBUF_EXPORT ResultCallback2 { +template <typename R, typename A1, typename A2> +class PROTOBUF_EXPORT ResultCallback2 { public: ResultCallback2() {} virtual ~ResultCallback2() {} @@ -117,7 +119,7 @@ class LIBPROTOBUF_EXPORT ResultCallback2 { namespace internal { -class LIBPROTOBUF_EXPORT FunctionClosure0 : public Closure { +class PROTOBUF_EXPORT FunctionClosure0 : public Closure { public: typedef void (*FunctionType)(); @@ -568,10 +570,11 @@ inline ResultCallback2<R, A1, A2>* NewPermanentCallback( // A function which does nothing. Useful for creating no-op callbacks, e.g.: // Closure* nothing = NewCallback(&DoNothing); -void LIBPROTOBUF_EXPORT DoNothing(); - +void PROTOBUF_EXPORT DoNothing(); } // namespace protobuf } // namespace google +#include <google/protobuf/port_undef.inc> + #endif // GOOGLE_PROTOBUF_STUBS_CALLBACK_H_ |