aboutsummaryrefslogtreecommitdiff
path: root/openssl/src/string.rs
diff options
context:
space:
mode:
authorSteven Fackler <[email protected]>2017-02-04 08:54:25 -0800
committerGitHub <[email protected]>2017-02-04 08:54:25 -0800
commit084cf3c66b7cc3d24cb23d2bb548fa0fa4ee040a (patch)
tree6c3e0f158d3cf63e5ae8229126e3430847398ad3 /openssl/src/string.rs
parentMerge pull request #571 from sfackler/build-script-cleanup (diff)
parentSwitch to foreign_types (diff)
downloadrust-openssl-084cf3c66b7cc3d24cb23d2bb548fa0fa4ee040a.tar.xz
rust-openssl-084cf3c66b7cc3d24cb23d2bb548fa0fa4ee040a.zip
Merge pull request #572 from sfackler/foreign-types
Switch to foreign_types
Diffstat (limited to 'openssl/src/string.rs')
-rw-r--r--openssl/src/string.rs10
1 files changed, 8 insertions, 2 deletions
diff --git a/openssl/src/string.rs b/openssl/src/string.rs
index 37d44d16..4a1d3479 100644
--- a/openssl/src/string.rs
+++ b/openssl/src/string.rs
@@ -1,14 +1,20 @@
use ffi;
+use foreign_types::{ForeignType, ForeignTypeRef};
use libc::{c_char, c_void};
use std::fmt;
use std::ffi::CStr;
use std::ops::Deref;
use std::str;
-use types::{OpenSslType, OpenSslTypeRef};
use stack::Stackable;
-type_!(OpensslString, OpensslStringRef, c_char, free);
+foreign_type! {
+ type CType = c_char;
+ fn drop = free;
+
+ pub struct OpensslString;
+ pub struct OpensslStringRef;
+}
impl OpensslString {
#[deprecated(note = "use from_ptr", since = "0.9.7")]