diff options
author | cmumford <cmumford@google.com> | 2017-10-04 11:26:45 -0700 |
---|---|---|
committer | Victor Costan <pwnall@chromium.org> | 2017-10-04 11:53:12 -0700 |
commit | 4a7e7f50dcf661cfffe71737650b0fb18e195d18 (patch) | |
tree | 613570bad946d1e0ac86fb86e0d12e97988527a8 /include/leveldb/iterator.h | |
parent | 542590d2a8eee3838f40b01405baa6d2f6f8c700 (diff) | |
download | leveldb-4a7e7f50dcf661cfffe71737650b0fb18e195d18.tar.gz |
Add LEVELDB_EXPORT macro to export public symbols.
gcc defaults to exporting all symbols, but other linkers do not. Adding
the LEVELDB_EXPORT macro allows a project to set LEVELDB_SHARED_LIBRARY
when building/linking with leveldb as a shared library.
This is to allow leveldb to be created as a shared library on all
platforms support by Chrome and enables a fix for
https://bugs.chromium.org/p/chromium/issues/detail?id=764810.
This also has the benefit of reducing the shared library size from
418863 to 380367 bytes (64-bit Linux).
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=171037148
Diffstat (limited to 'include/leveldb/iterator.h')
-rw-r--r-- | include/leveldb/iterator.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/include/leveldb/iterator.h b/include/leveldb/iterator.h index da631ed..ff3b566 100644 --- a/include/leveldb/iterator.h +++ b/include/leveldb/iterator.h @@ -15,12 +15,13 @@ #ifndef STORAGE_LEVELDB_INCLUDE_ITERATOR_H_ #define STORAGE_LEVELDB_INCLUDE_ITERATOR_H_ +#include "leveldb/export.h" #include "leveldb/slice.h" #include "leveldb/status.h" namespace leveldb { -class Iterator { +class LEVELDB_EXPORT Iterator { public: Iterator(); virtual ~Iterator(); @@ -90,10 +91,10 @@ class Iterator { }; // Return an empty iterator (yields nothing). -extern Iterator* NewEmptyIterator(); +LEVELDB_EXPORT Iterator* NewEmptyIterator(); // Return an empty iterator with the specified status. -extern Iterator* NewErrorIterator(const Status& status); +LEVELDB_EXPORT Iterator* NewErrorIterator(const Status& status); } // namespace leveldb |