You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

18 lines
405 B

#include "../rocksdb/include/rocksdb/version.h"
#include "c.h"
static char* CopyString(const std::string& str) {
char* result = reinterpret_cast<char*>(malloc(sizeof(char) * str.size()));
memcpy(result, str.data(), sizeof(char) * str.size());
return result;
}
extern "C" {
char* rocksdb_version() {
auto name = ROCKSDB_NAMESPACE::GetRocksVersionAsString(true);
return CopyString(name);
}
}