diff --git a/Cargo.toml b/Cargo.toml index d88c2992970a1b31c97be6ce5b38958a3eae43ad..a128eff4bc6f61de42e4fdc01305b4290c6ec7c9 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 890992972e7bf73661f81fe115e6b0d3767d0bf4..e2a0ac4b9ce1d1dcc056ca7f303d1284d5488f5a 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 12d1c7eccda13dbd3330b36de004192b50a1ed62..8ce709c2f83905bd47a2346794dda3465738298e 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 63065290106201ef47a18f3c398fd358f6d60253..5938256eeb8b3084925848b8f563db58e89f6019 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 fdc25e0d53658ea265d48f66c172f99c9ccc5366..305d0958af79d0bc217e3fcbf7e8604d932b564a 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 09d164c7311882dc827b89dd426194d8320f1cbb..57212db4c0c89d0e96c246d80e5f318b9960ce5c 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;