We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e941084 commit f120913Copy full SHA for f120913
value.rs
@@ -1,4 +1,4 @@
1
-use std::ffi::CStr;
+use std::ffi::{CStr, CString};
2
use std::marker::PhantomData;
3
use std::mem;
4
use std::str;
@@ -31,7 +31,7 @@ pub trait INSValue : INSObject {
31
32
fn from_value(value: Self::Value) -> Id<Self> {
33
let cls = Self::class();
34
- let encoding = Self::Value::encode();
+ let encoding = CString::new(Self::Value::encode().as_str()).unwrap();
35
unsafe {
36
let obj: *mut Self = msg_send![cls, alloc];
37
let obj: *mut Self = msg_send![obj, initWithBytes:&value
0 commit comments