forked from mirrors/gstreamer-rs
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.
This commit is contained in:
parent
faa6467d7a
commit
004ce5d392
3 changed files with 6 additions and 3 deletions
|
@ -27,7 +27,7 @@ muldiv = "0.2"
|
|||
serde = { version = "1.0", optional = true }
|
||||
serde_bytes = { version = "0.11", optional = true }
|
||||
serde_derive = { version = "1.0", optional = true }
|
||||
paste = "0.1"
|
||||
paste = { version = "0.1", optional = true }
|
||||
|
||||
[build-dependencies.rustdoc-stripper]
|
||||
version = "0.1"
|
||||
|
@ -49,4 +49,4 @@ purge-lgpl-docs = ["rustdoc-stripper"]
|
|||
dox = ["gstreamer-sys/dox", "glib/dox", "futures", "ser_de"]
|
||||
futures = ["futures-core-preview"]
|
||||
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;
|
|||
pub extern crate gobject_sys;
|
||||
#[doc(hidden)]
|
||||
pub extern crate gstreamer_sys as gst_sys;
|
||||
#[doc(hidden)]
|
||||
#[cfg(feature = "subclassing")]
|
||||
pub extern crate paste;
|
||||
|
||||
#[macro_use]
|
||||
#[doc(hidden)]
|
||||
|
|
|
@ -60,7 +60,7 @@ macro_rules! gst_plugin_define(
|
|||
}
|
||||
}
|
||||
|
||||
paste::item! {
|
||||
$crate::paste::item! {
|
||||
#[no_mangle]
|
||||
pub unsafe extern "C" fn [<gst_plugin_ $name _register>] () {
|
||||
let _ = plugin_register_static();
|
||||
|
|
Loading…
Reference in a new issue