Add r_get_location() for RFileLockEntry
This commit is contained in:
parent
a5f47d4b2f
commit
f362cbdd6d
1 changed files with 22 additions and 0 deletions
|
@ -17,6 +17,11 @@
|
|||
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
//
|
||||
|
||||
use ruru::AnyObject;
|
||||
trait Wrap {
|
||||
fn wrap(self) -> AnyObject;
|
||||
}
|
||||
|
||||
#[allow(unused_variables)]
|
||||
pub mod storeid {
|
||||
use std::path::PathBuf;
|
||||
|
@ -28,6 +33,13 @@ pub mod storeid {
|
|||
wrappable_struct!(StoreId, StoreIdWrapper, STOREID_WRAPPER);
|
||||
class!(RStoreId);
|
||||
|
||||
use store::Wrap;
|
||||
impl Wrap for StoreId {
|
||||
fn wrap(self) -> AnyObject {
|
||||
Class::from_existing("RStoreId").wrap_data(self, &*STOREID_WRAPPER)
|
||||
}
|
||||
}
|
||||
|
||||
methods!(
|
||||
RStoreId,
|
||||
itself,
|
||||
|
@ -167,6 +179,7 @@ pub mod store {
|
|||
|
||||
use ruby_utils::IntoToml;
|
||||
use toml_utils::IntoRuby;
|
||||
use store::Wrap;
|
||||
|
||||
pub struct FLECustomWrapper(Box<FLE<'static>>);
|
||||
|
||||
|
@ -187,6 +200,15 @@ pub mod store {
|
|||
wrappable_struct!(FLECustomWrapper, FileLockEntryWrapper, FLE_WRAPPER);
|
||||
class!(RFileLockEntry);
|
||||
|
||||
methods!(
|
||||
RFileLockEntry,
|
||||
itself,
|
||||
|
||||
fn r_get_location() -> AnyObject {
|
||||
itself.get_data(&*FLE_WRAPPER).get_location().clone().wrap()
|
||||
}
|
||||
);
|
||||
|
||||
wrappable_struct!(EntryHeader, EntryHeaderWrapper, ENTRY_HEADER_WRAPPER);
|
||||
class!(REntryHeader);
|
||||
methods!(
|
||||
|
|
Loading…
Reference in a new issue