Commit 004ce5d3 authored by Sebastian Dröge's avatar Sebastian Dröge 🍵

gstreamer: Re-export the paste crate for the gst_plugin_define! macro

And only depend on the paste crate if the subclass feature is requested.
parent faa6467d
Pipeline #38992 passed with stages
in 8 minutes and 39 seconds
...@@ -27,7 +27,7 @@ muldiv = "0.2" ...@@ -27,7 +27,7 @@ muldiv = "0.2"
serde = { version = "1.0", optional = true } serde = { version = "1.0", optional = true }
serde_bytes = { version = "0.11", optional = true } serde_bytes = { version = "0.11", optional = true }
serde_derive = { version = "1.0", optional = true } serde_derive = { version = "1.0", optional = true }
paste = "0.1" paste = { version = "0.1", optional = true }
[build-dependencies.rustdoc-stripper] [build-dependencies.rustdoc-stripper]
version = "0.1" version = "0.1"
...@@ -49,4 +49,4 @@ purge-lgpl-docs = ["rustdoc-stripper"] ...@@ -49,4 +49,4 @@ purge-lgpl-docs = ["rustdoc-stripper"]
dox = ["gstreamer-sys/dox", "glib/dox", "futures", "ser_de"] dox = ["gstreamer-sys/dox", "glib/dox", "futures", "ser_de"]
futures = ["futures-core-preview"] futures = ["futures-core-preview"]
ser_de = ["num-rational/serde", "serde", "serde_bytes", "serde_derive"] ser_de = ["num-rational/serde", "serde", "serde_bytes", "serde_derive"]
subclassing = ["glib/subclassing"] subclassing = ["glib/subclassing", "paste"]
...@@ -23,6 +23,9 @@ pub extern crate glib_sys; ...@@ -23,6 +23,9 @@ pub extern crate glib_sys;
pub extern crate gobject_sys; pub extern crate gobject_sys;
#[doc(hidden)] #[doc(hidden)]
pub extern crate gstreamer_sys as gst_sys; pub extern crate gstreamer_sys as gst_sys;
#[doc(hidden)]
#[cfg(feature = "subclassing")]
pub extern crate paste;
#[macro_use] #[macro_use]
#[doc(hidden)] #[doc(hidden)]
......
...@@ -60,7 +60,7 @@ macro_rules! gst_plugin_define( ...@@ -60,7 +60,7 @@ macro_rules! gst_plugin_define(
} }
} }
paste::item! { $crate::paste::item! {
#[no_mangle] #[no_mangle]
pub unsafe extern "C" fn [<gst_plugin_ $name _register>] () { pub unsafe extern "C" fn [<gst_plugin_ $name _register>] () {
let _ = plugin_register_static(); let _ = plugin_register_static();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment