Skip to content

Commit

Permalink
Fixed issue #23.
Browse files Browse the repository at this point in the history
  • Loading branch information
arnimarj@gmail.com committed Sep 21, 2012
1 parent c25fde4 commit 791c5bb
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
6 changes: 3 additions & 3 deletions leveldb_object.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ static void PyLevelDB_set_error(leveldb::Status& status)
const char pyleveldb_repair_db_doc[] =
"leveldb.RepairDB(db_dir)\n\nAttempts to recover as much data as possible from a corrupt database."
;
extern PyObject* pyleveldb_repair_db(PyLevelDB* self, PyObject* args)
PyObject* pyleveldb_repair_db(PyLevelDB* self, PyObject* args)
{
const char* db_dir = 0;

Expand All @@ -43,7 +43,7 @@ extern PyObject* pyleveldb_repair_db(PyLevelDB* self, PyObject* args)
const char pyleveldb_destroy_db_doc[] =
"leveldb.DestroyDB(db_dir)\n\nAttempts to recover as much data as possible from a corrupt database."
;
extern PyObject* pyleveldb_destroy_db(PyObject* self, PyObject* args)
PyObject* pyleveldb_destroy_db(PyObject* self, PyObject* args)
{
const char* db_dir = 0;

Expand Down Expand Up @@ -718,7 +718,7 @@ static PyObject* PyLevelDB_GetStatus(PyLevelDB* self)
return 0;
}

#if PY_MAJOR_VERSION >= 3
#if PY_MAJOR_VERSION >= 3
return PyUnicode_DecodeLatin1(value.c_str(), value.size(), 0);
#else
return PyString_FromString(value.c_str());
Expand Down
3 changes: 2 additions & 1 deletion test/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,9 @@ def setUp(self):
self.lowercase = string.ascii_lowercase
self.uppercase = string.ascii_uppercase

# destroy previous database, if any
# repair/destroy previous database, if any
self.name = 'db_a'
self.leveldb.RepairDB(self.name)
self.leveldb.DestroyDB(self.name)

def _open_options(self, create_if_missing = True, error_if_exists = False):
Expand Down
8 changes: 4 additions & 4 deletions versions/download.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ set -e

# see http://python.org/download/releases/

wget -qc http://python.org/ftp/python/3.3.0/Python-3.3.0a4.tar.bz2;
wget -qc http://python.org/ftp/python/3.3.0/Python-3.3.0rc2.tar.bz2;
wget -qc http://python.org/ftp/python/3.2.3/Python-3.2.3.tar.bz2;
wget -qc http://python.org/ftp/python/3.2.3/Python-3.2.3.tar.bz2;
wget -qc http://python.org/ftp/python/3.1.5/Python-3.1.5.tar.bz2;
Expand Down Expand Up @@ -51,8 +51,8 @@ set -e

(
unset PYTHONDONTWRITEBYTECODE;
rm -rf Python-3.3.0a4-env;
Python-3.3.0a4-build/bin/pyvenv Python-3.3.0a4-env;
source Python-3.3.0a4-env/bin/activate;
rm -rf Python-3.3.0rc2-env;
Python-3.3.0a4-build/bin/pyvenv Python-3.3.0rc2-env;
source Python-3.3.0rc2-env/bin/activate;
)
)

0 comments on commit 791c5bb

Please sign in to comment.