summaryrefslogtreecommitdiff
path: root/table
diff options
context:
space:
mode:
authorgabor@google.com <gabor@google.com@62dab493-f737-651d-591e-8d6aee1b9529>2011-07-19 23:36:47 +0000
committergabor@google.com <gabor@google.com@62dab493-f737-651d-591e-8d6aee1b9529>2011-07-19 23:36:47 +0000
commit6872ace90110799f87402cbc594c4cbf1bc474c7 (patch)
treee6292e5ec9404ddab7c1de7b7272927161b06232 /table
parent6699c7ebe68fba9673ea7a78b54e0eb558102301 (diff)
downloadleveldb-6872ace90110799f87402cbc594c4cbf1bc474c7.tar.gz
Sun Studio support, and fix for test related memory fixes.
- LevelDB patch for Sun Studio Based on a patch submitted by Theo Schlossnagle - thanks! This fixes Issue 17. - Fix a couple of test related memory leaks. git-svn-id: https://leveldb.googlecode.com/svn/trunk@38 62dab493-f737-651d-591e-8d6aee1b9529
Diffstat (limited to 'table')
-rw-r--r--table/table_test.cc9
1 files changed, 7 insertions, 2 deletions
diff --git a/table/table_test.cc b/table/table_test.cc
index 10d08fc..c69a386 100644
--- a/table/table_test.cc
+++ b/table/table_test.cc
@@ -5,6 +5,7 @@
#include "leveldb/table.h"
#include <map>
+#include <string>
#include "db/dbformat.h"
#include "db/memtable.h"
#include "db/write_batch_internal.h"
@@ -25,7 +26,11 @@ namespace leveldb {
// Used to test non-lexicographic comparators.
static std::string Reverse(const Slice& key) {
std::string str(key.ToString());
- std::string rev(str.rbegin(), str.rend());
+ std::string rev("");
+ for (std::string::reverse_iterator rit = str.rbegin();
+ rit != str.rend(); ++rit) {
+ rev.push_back(*rit);
+ }
return rev;
}
@@ -411,7 +416,7 @@ enum TestType {
TABLE_TEST,
BLOCK_TEST,
MEMTABLE_TEST,
- DB_TEST,
+ DB_TEST
};
struct TestArgs {