Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Release LevelDB 1.17

- Cleanup: delete unused IntSetToString

  It was added in http://cr/19491949 (and was referenced at the time).
  The last reference was removed in http://cr/19507363.

  This fixes warning/error with pre-release crosstoolv18:
    'std::string leveldb::{anonymous}::IntSetToString(const std::set<long unsigned int>&)' defined but not used [-Werror=unused-function]

- Added arm64 and and armv7s to IOS build as suggested on leveldb mailing list.

- Changed local variable type from int to size_t

  This eliminates compiler warning/error and resolves
  https://code.google.com/p/leveldb/issues/detail?id=140
  • Loading branch information...
commit e353fbc7ea81f12a5694991b708f8f45343594b1 1 parent 269fc6c
Chris Mumford authored
11 Makefile
@@ -72,7 +72,7 @@ SHARED = $(SHARED1)
72 72 else
73 73 # Update db.h if you change these.
74 74 SHARED_MAJOR = 1
75   -SHARED_MINOR = 16
  75 +SHARED_MINOR = 17
76 76 SHARED1 = libleveldb.$(PLATFORM_SHARED_EXT)
77 77 SHARED2 = $(SHARED1).$(SHARED_MAJOR)
78 78 SHARED3 = $(SHARED1).$(SHARED_MAJOR).$(SHARED_MINOR)
@@ -190,19 +190,20 @@ PLATFORMSROOT=/Applications/Xcode.app/Contents/Developer/Platforms
190 190 SIMULATORROOT=$(PLATFORMSROOT)/iPhoneSimulator.platform/Developer
191 191 DEVICEROOT=$(PLATFORMSROOT)/iPhoneOS.platform/Developer
192 192 IOSVERSION=$(shell defaults read $(PLATFORMSROOT)/iPhoneOS.platform/version CFBundleShortVersionString)
  193 +IOSARCH=-arch armv6 -arch armv7 -arch armv7s -arch arm64
193 194
194 195 .cc.o:
195 196 mkdir -p ios-x86/$(dir $@)
196   - $(CXX) $(CXXFLAGS) -isysroot $(SIMULATORROOT)/SDKs/iPhoneSimulator$(IOSVERSION).sdk -arch i686 -c $< -o ios-x86/$@
  197 + $(CXX) $(CXXFLAGS) -isysroot $(SIMULATORROOT)/SDKs/iPhoneSimulator$(IOSVERSION).sdk -arch i686 -arch x86_64 -c $< -o ios-x86/$@
197 198 mkdir -p ios-arm/$(dir $@)
198   - xcrun -sdk iphoneos $(CXX) $(CXXFLAGS) -isysroot $(DEVICEROOT)/SDKs/iPhoneOS$(IOSVERSION).sdk -arch armv6 -arch armv7 -c $< -o ios-arm/$@
  199 + xcrun -sdk iphoneos $(CXX) $(CXXFLAGS) -isysroot $(DEVICEROOT)/SDKs/iPhoneOS$(IOSVERSION).sdk $(IOSARCH) -c $< -o ios-arm/$@
199 200 lipo ios-x86/$@ ios-arm/$@ -create -output $@
200 201
201 202 .c.o:
202 203 mkdir -p ios-x86/$(dir $@)
203   - $(CC) $(CFLAGS) -isysroot $(SIMULATORROOT)/SDKs/iPhoneSimulator$(IOSVERSION).sdk -arch i686 -c $< -o ios-x86/$@
  204 + $(CC) $(CFLAGS) -isysroot $(SIMULATORROOT)/SDKs/iPhoneSimulator$(IOSVERSION).sdk -arch i686 -arch x86_64 -c $< -o ios-x86/$@
204 205 mkdir -p ios-arm/$(dir $@)
205   - xcrun -sdk iphoneos $(CC) $(CFLAGS) -isysroot $(DEVICEROOT)/SDKs/iPhoneOS$(IOSVERSION).sdk -arch armv6 -arch armv7 -c $< -o ios-arm/$@
  206 + xcrun -sdk iphoneos $(CC) $(CFLAGS) -isysroot $(DEVICEROOT)/SDKs/iPhoneOS$(IOSVERSION).sdk $(IOSARCH) -c $< -o ios-arm/$@
206 207 lipo ios-x86/$@ ios-arm/$@ -create -output $@
207 208
208 209 else
14 db/version_set.cc
@@ -54,20 +54,6 @@ static int64_t TotalFileSize(const std::vector<FileMetaData*>& files) {
54 54 return sum;
55 55 }
56 56
57   -namespace {
58   -std::string IntSetToString(const std::set<uint64_t>& s) {
59   - std::string result = "{";
60   - for (std::set<uint64_t>::const_iterator it = s.begin();
61   - it != s.end();
62   - ++it) {
63   - result += (result.size() > 1) ? "," : "";
64   - result += NumberToString(*it);
65   - }
66   - result += "}";
67   - return result;
68   -}
69   -} // namespace
70   -
71 57 Version::~Version() {
72 58 assert(refs_ == 0);
73 59
2  include/leveldb/db.h
@@ -14,7 +14,7 @@ namespace leveldb {
14 14
15 15 // Update Makefile if you change these
16 16 static const int kMajorVersion = 1;
17   -static const int kMinorVersion = 16;
  17 +static const int kMinorVersion = 17;
18 18
19 19 struct Options;
20 20 struct ReadOptions;
2  include/leveldb/slice.h
@@ -94,7 +94,7 @@ inline bool operator!=(const Slice& x, const Slice& y) {
94 94 }
95 95
96 96 inline int Slice::compare(const Slice& b) const {
97   - const int min_len = (size_ < b.size_) ? size_ : b.size_;
  97 + const size_t min_len = (size_ < b.size_) ? size_ : b.size_;
98 98 int r = memcmp(data_, b.data_, min_len);
99 99 if (r == 0) {
100 100 if (size_ < b.size_) r = -1;

0 comments on commit e353fbc

Please sign in to comment.
Something went wrong with that request. Please try again.