From 7dd5ce9e9f26e23bc633ea311e11173f01b87967 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Kornel=20Lesin=CC=81ski?= <kornel@geekhood.net>
Date: Fri, 5 Jun 2020 21:35:59 +0100
Subject: [PATCH] Update foreign-types

---
 Cargo.toml            | 4 ++--
 src/mlu.rs            | 2 +-
 src/namedcolorlist.rs | 2 +-
 src/pipeline.rs       | 2 +-
 src/stage.rs          | 2 +-
 src/tonecurve.rs      | 2 +-
 6 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/Cargo.toml b/Cargo.toml
index d88c299..a128eff 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -10,11 +10,11 @@ homepage = "https://lib.rs/crates/lcms2"
 documentation = "https://kornelski.github.io/rust-lcms2/lcms2/"
 repository = "https://github.com/kornelski/rust-lcms2.git"
 categories = ["multimedia::images", "api-bindings"]
-version = "5.2.0"
+version = "5.3.0-alpha"
 edition = "2018"
 
 [dependencies]
-foreign-types = "0.4.0"
+foreign-types = "0.5"
 lcms2-sys = "3.1.2"
 
 [features]
diff --git a/src/mlu.rs b/src/mlu.rs
index 8909929..e2a0ac4 100644
--- a/src/mlu.rs
+++ b/src/mlu.rs
@@ -11,7 +11,7 @@ use foreign_types::{ForeignType, ForeignTypeRef};
 foreign_type! {
     /// This represents owned Multi Localized Unicode type. Most methods are implemented on `MLURef`.
     /// This is a borrwed Multi Localized Unicode type. It holds Unicode strings associated with `Locale`.
-    pub type MLU {
+    pub unsafe type MLU {
         type CType = ffi::MLU;
         fn drop = ffi::cmsMLUfree;
     }
diff --git a/src/namedcolorlist.rs b/src/namedcolorlist.rs
index 12d1c7e..8ce709c 100644
--- a/src/namedcolorlist.rs
+++ b/src/namedcolorlist.rs
@@ -17,7 +17,7 @@ pub struct NamedColorInfo {
 
 foreign_type! {
     /// Palette of colors with names
-    pub type NamedColorList {
+    pub unsafe type NamedColorList {
         type CType = ffi::NAMEDCOLORLIST;
         fn drop = ffi::cmsFreeNamedColorList;
     }
diff --git a/src/pipeline.rs b/src/pipeline.rs
index 6306529..5938256 100644
--- a/src/pipeline.rs
+++ b/src/pipeline.rs
@@ -13,7 +13,7 @@ foreign_type! {
     ///
     /// This is an owned version of `PipelineRef`.
     #[doc(hidden)]
-    pub type Pipeline {
+    pub unsafe type Pipeline {
         type CType = ffi::Pipeline;
         fn drop = ffi::cmsPipelineFree;
         fn clone = ffi::cmsPipelineDup;
diff --git a/src/stage.rs b/src/stage.rs
index fdc25e0..305d095 100644
--- a/src/stage.rs
+++ b/src/stage.rs
@@ -14,7 +14,7 @@ foreign_type! {
     /// See the plug-in API for further details.
     ///
     /// This is an owned version of `Stage`.
-    pub type Stage {
+    pub unsafe type Stage {
         type CType = ffi::Stage;
         fn drop = ffi::cmsStageFree;
     }
diff --git a/src/tonecurve.rs b/src/tonecurve.rs
index 09d164c..57212db 100644
--- a/src/tonecurve.rs
+++ b/src/tonecurve.rs
@@ -10,7 +10,7 @@ foreign_type! {
     /// The curve is stored in segments, where each segment can be sampled or specified by parameters. A 16.bit simplification of the *whole* curve is kept for optimization purposes. For float operation, each segment is evaluated separately. Plug-ins may be used to define new parametric schemes.
     ///
     /// Owned version of `ToneCurveRef`
-    pub type ToneCurve {
+    pub unsafe type ToneCurve {
         type CType = ffi::ToneCurve;
         fn drop = ffi::cmsFreeToneCurve;
         fn clone = ffi::cmsDupToneCurve;
-- 
GitLab