With a little help, we now have VerseKey
Went with a basic wrapper that cxx is able to handle for the bridge between the languages, along with simple wrapper methods
This commit is contained in:
@@ -15,6 +15,16 @@ namespace sword_rs {
|
||||
return rust::String(this->module->getType());
|
||||
}
|
||||
|
||||
VerseKey* Module::get_verse_key() const {
|
||||
sword::VerseKey* key = dynamic_cast<sword::VerseKey*>(this->module->getKey());
|
||||
if (key) {
|
||||
// Create a borrowed VerseKey on the heap - caller must delete but not the inner ptr
|
||||
VerseKey* result = new VerseKey{key, false};
|
||||
return result;
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void Module::increment() {
|
||||
this->module->increment();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user