7d61b63b79
which makes py3 support possible
20 lines
557 B
Cython
20 lines
557 B
Cython
from libcpp.string cimport string
|
|
from libcpp cimport bool as cpp_bool
|
|
|
|
cdef extern from "rocksdb/slice.h" namespace "rocksdb":
|
|
cdef cppclass Slice:
|
|
Slice()
|
|
Slice(const char*, size_t)
|
|
Slice(const string&)
|
|
Slice(const char*)
|
|
|
|
const char* data()
|
|
size_t size()
|
|
cpp_bool empty()
|
|
char operator[](int)
|
|
void clear()
|
|
void remove_prefix(size_t)
|
|
string ToString()
|
|
string ToString(cpp_bool)
|
|
int compare(const Slice&)
|
|
cpp_bool starts_with(const Slice&)
|