From 12ae31ad476d373ce93b4222d3875b9663f3da17 Mon Sep 17 00:00:00 2001 From: Steven Fackler Date: Fri, 3 Feb 2017 01:24:05 -0800 Subject: Switch to foreign_types --- openssl/src/string.rs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'openssl/src/string.rs') 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")] -- cgit v1.2.3