Commit 117064c1 authored by liujisi@google.com's avatar liujisi@google.com

add missing dll export macros for msvc.

parent 71caf8c2
......@@ -59,7 +59,7 @@ void WriteMethodDocComment(io::Printer* printer,
const MethodDescriptor* method);
// Exposed for testing only.
string EscapeJavadoc(const string& input);
LIBPROTOC_EXPORT string EscapeJavadoc(const string& input);
} // namespace java
} // namespace compiler
......
......@@ -53,7 +53,7 @@ class Message;
namespace compiler {
// Utility class for launching sub-processes.
class Subprocess {
class LIBPROTOC_EXPORT Subprocess {
public:
Subprocess();
~Subprocess();
......
......@@ -188,7 +188,7 @@ bool Message::SerializePartialToOstream(ostream* output) const {
Reflection::~Reflection() {}
#define HANDLE_TYPE(TYPE, CPPTYPE, CTYPE) \
template<> \
template<> LIBPROTOBUF_EXPORT \
const RepeatedField<TYPE>& Reflection::GetRepeatedField<TYPE>( \
const Message& message, const FieldDescriptor* field) const { \
return *static_cast<RepeatedField<TYPE>* >( \
......@@ -196,7 +196,7 @@ const RepeatedField<TYPE>& Reflection::GetRepeatedField<TYPE>( \
field, CPPTYPE, CTYPE, NULL)); \
} \
\
template<> \
template<> LIBPROTOBUF_EXPORT \
RepeatedField<TYPE>* Reflection::MutableRepeatedField<TYPE>( \
Message* message, const FieldDescriptor* field) const { \
return static_cast<RepeatedField<TYPE>* >( \
......
......@@ -118,6 +118,7 @@ typedef internal::AtomicWord ProtobufOnceType;
#define GOOGLE_PROTOBUF_ONCE_INIT ::google::protobuf::ONCE_STATE_UNINITIALIZED
LIBPROTOBUF_EXPORT
void GoogleOnceInitImpl(ProtobufOnceType* once, Closure* closure);
inline void GoogleOnceInit(ProtobufOnceType* once, void (*init_func)()) {
......
......@@ -50,25 +50,25 @@ namespace google {
namespace protobuf {
// Return a C++ string
extern string StringPrintf(const char* format, ...);
LIBPROTOBUF_EXPORT extern string StringPrintf(const char* format, ...);
// Store result into a supplied string and return it
extern const string& SStringPrintf(string* dst, const char* format, ...);
LIBPROTOBUF_EXPORT extern const string& SStringPrintf(string* dst, const char* format, ...);
// Append result to a supplied string
extern void StringAppendF(string* dst, const char* format, ...);
LIBPROTOBUF_EXPORT extern void StringAppendF(string* dst, const char* format, ...);
// Lower-level routine that takes a va_list and appends to a specified
// string. All other routines are just convenience wrappers around it.
extern void StringAppendV(string* dst, const char* format, va_list ap);
LIBPROTOBUF_EXPORT extern void StringAppendV(string* dst, const char* format, va_list ap);
// The max arguments supported by StringPrintfVector
extern const int kStringPrintfVectorMaxArgs;
LIBPROTOBUF_EXPORT extern const int kStringPrintfVectorMaxArgs;
// You can use this version when all your arguments are strings, but
// you don't know how many arguments you'll have at compile time.
// StringPrintfVector will LOG(FATAL) if v.size() > kStringPrintfVectorMaxArgs
extern string StringPrintfVector(const char* format, const vector<string>& v);
LIBPROTOBUF_EXPORT extern string StringPrintfVector(const char* format, const vector<string>& v);
} // namespace protobuf
} // namespace google
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment