Skip to content

Commit

Permalink
Remove FastCWaker
Browse files Browse the repository at this point in the history
  • Loading branch information
h33p committed Jul 29, 2024
1 parent 95a9849 commit c6866cb
Show file tree
Hide file tree
Showing 6 changed files with 49 additions and 282 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions cglue-gen/src/ext/core/future.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ pub fn get_impl(parent_path: &Path, out: &mut Vec<(Path, TokenStream)>) {
#[custom_impl(
// Types within the C interface other than self and additional wrappers.
{
cx: &#crate_path::task::FastCWaker,
cx: &#crate_path::task::CWaker,
out: &mut ::core::mem::MaybeUninit<Self::Output>,
},
// Unwrapped return type
Expand All @@ -26,7 +26,7 @@ pub fn get_impl(parent_path: &Path, out: &mut Vec<(Path, TokenStream)>) {
{
let mut out_v = ::core::mem::MaybeUninit::uninit();
let out = &mut out_v;
let cx = #crate_path::task::FastCWaker::from(cx.waker());
let cx = #crate_path::task::CWaker::from(cx.waker());
let cx = &cx;
},
// This is the body of C impl minus the automatic wrapping.
Expand Down
12 changes: 6 additions & 6 deletions cglue-gen/src/ext/futures/sink.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ pub fn get_impl(parent_path: &Path, out: &mut Vec<(Path, TokenStream)>) {
#[custom_impl(
// Types within the C interface other than self and additional wrappers.
{
cx: &#crate_path::task::FastCWaker,
cx: &#crate_path::task::CWaker,
out: &mut ::core::mem::MaybeUninit<Self::Error>,
},
// Unwrapped return type
Expand All @@ -26,7 +26,7 @@ pub fn get_impl(parent_path: &Path, out: &mut Vec<(Path, TokenStream)>) {
{
let mut out_v = ::core::mem::MaybeUninit::uninit();
let out = &mut out_v;
let cx = #crate_path::task::FastCWaker::from(cx.waker());
let cx = #crate_path::task::CWaker::from(cx.waker());
let cx = &cx;
},
// This is the body of C impl minus the automatic wrapping.
Expand Down Expand Up @@ -93,7 +93,7 @@ pub fn get_impl(parent_path: &Path, out: &mut Vec<(Path, TokenStream)>) {
#[custom_impl(
// Types within the C interface other than self and additional wrappers.
{
cx: &#crate_path::task::FastCWaker,
cx: &#crate_path::task::CWaker,
out: &mut ::core::mem::MaybeUninit<Self::Error>,
},
// Unwrapped return type
Expand All @@ -102,7 +102,7 @@ pub fn get_impl(parent_path: &Path, out: &mut Vec<(Path, TokenStream)>) {
{
let mut out_v = ::core::mem::MaybeUninit::uninit();
let out = &mut out_v;
let cx = #crate_path::task::FastCWaker::from(cx.waker());
let cx = #crate_path::task::CWaker::from(cx.waker());
let cx = &cx;
},
// This is the body of C impl minus the automatic wrapping.
Expand Down Expand Up @@ -135,7 +135,7 @@ pub fn get_impl(parent_path: &Path, out: &mut Vec<(Path, TokenStream)>) {
#[custom_impl(
// Types within the C interface other than self and additional wrappers.
{
cx: &#crate_path::task::FastCWaker,
cx: &#crate_path::task::CWaker,
out: &mut ::core::mem::MaybeUninit<Self::Error>,
},
// Unwrapped return type
Expand All @@ -144,7 +144,7 @@ pub fn get_impl(parent_path: &Path, out: &mut Vec<(Path, TokenStream)>) {
{
let mut out_v = ::core::mem::MaybeUninit::uninit();
let out = &mut out_v;
let cx = #crate_path::task::FastCWaker::from(cx.waker());
let cx = #crate_path::task::CWaker::from(cx.waker());
let cx = &cx;
},
// This is the body of C impl minus the automatic wrapping.
Expand Down
4 changes: 2 additions & 2 deletions cglue-gen/src/ext/futures/stream.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ pub fn get_impl(parent_path: &Path, out: &mut Vec<(Path, TokenStream)>) {
#[custom_impl(
// Types within the C interface other than self and additional wrappers.
{
cx: &#crate_path::task::FastCWaker,
cx: &#crate_path::task::CWaker,
out: &mut ::core::mem::MaybeUninit<Self::Item>,
},
// Unwrapped return type
Expand All @@ -26,7 +26,7 @@ pub fn get_impl(parent_path: &Path, out: &mut Vec<(Path, TokenStream)>) {
{
let mut out_v = ::core::mem::MaybeUninit::uninit();
let out = &mut out_v;
let cx = #crate_path::task::FastCWaker::from(cx.waker());
let cx = #crate_path::task::CWaker::from(cx.waker());
let cx = &cx;
},
// This is the body of C impl minus the automatic wrapping.
Expand Down
2 changes: 1 addition & 1 deletion cglue/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "cglue"
version = "0.3.1"
version = "0.3.2"
authors = ["Aurimas Blažulionis <[email protected]>"]
edition = "2018"
description = "FFI safe abstractions for making plugins and C-compatible libraries"
Expand Down
Loading

0 comments on commit c6866cb

Please sign in to comment.