diff options
| author | Steven Fackler <[email protected]> | 2017-02-03 01:24:05 -0800 |
|---|---|---|
| committer | Steven Fackler <[email protected]> | 2017-02-03 23:03:35 -0800 |
| commit | 12ae31ad476d373ce93b4222d3875b9663f3da17 (patch) | |
| tree | 6c3e0f158d3cf63e5ae8229126e3430847398ad3 /openssl/src/string.rs | |
| parent | Merge pull request #571 from sfackler/build-script-cleanup (diff) | |
| download | rust-openssl-12ae31ad476d373ce93b4222d3875b9663f3da17.tar.xz rust-openssl-12ae31ad476d373ce93b4222d3875b9663f3da17.zip | |
Switch to foreign_types
Diffstat (limited to 'openssl/src/string.rs')
| -rw-r--r-- | openssl/src/string.rs | 10 |
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")] |