aboutsummaryrefslogtreecommitdiff
path: root/openssl/src/string.rs
diff options
context:
space:
mode:
authormredlek <[email protected]>2017-02-07 20:41:27 +0100
committermredlek <[email protected]>2017-02-07 20:41:27 +0100
commit30a634c877b831a0e8faf26433a302f8df61d256 (patch)
treec6aa3a0edd4ec50e5a7e571d4facc2502a4b4d7f /openssl/src/string.rs
parentAdd setters to new getter-functions in X509ReqRef (diff)
parentMerge pull request #572 from sfackler/foreign-types (diff)
downloadrust-openssl-30a634c877b831a0e8faf26433a302f8df61d256.tar.xz
rust-openssl-30a634c877b831a0e8faf26433a302f8df61d256.zip
Merge branch 'master' into x509_req_version_subject
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")]