-
-
Notifications
You must be signed in to change notification settings - Fork 186
Closed
Description
Hey, I'm using master mlua branch and I want to interact with luajit string.buffer extension which are cdata. I need to retrieve a c_void pointer to convert it into a slice of byte. I noticed that there is a Value::to_pointer method but it doesn't handle the new Value::Other variant introduced few days ago.
Is there a way to get a pointer from a Value::Other or this should be handled in this function ?
diff --git a/src/value.rs b/src/value.rs
index e68f753..9a77a46 100644
--- a/src/value.rs
+++ b/src/value.rs
@@ -137,6 +137,7 @@ impl Value {
| Value::Table(Table(vref))
| Value::Function(Function(vref))
| Value::Thread(Thread(vref, ..))
+ | Value::Other(vref)
| Value::UserData(AnyUserData(vref, ..)) => vref.to_pointer(),
#[cfg(feature = "luau")]
Value::Buffer(crate::Buffer(vref)) => vref.to_pointer(),
Metadata
Metadata
Assignees
Labels
No labels