mirror of
https://github.com/danog/php-tokio.git
synced 2024-11-26 12:24:58 +01:00
Update to upstream ext-php-rs
This commit is contained in:
parent
1c41b1a5ac
commit
8281709cbb
@ -2,14 +2,14 @@
|
||||
name = "php-tokio"
|
||||
repository = "https://github.com/danog/php-tokio"
|
||||
homepage = "https://github.com/danog/php-tokio"
|
||||
license = "AGPL-3.0-or-later"
|
||||
license = "Apache-2.0"
|
||||
description = "Use any async Rust library from PHP!"
|
||||
version = "0.1.2"
|
||||
authors = ["Daniil Gentili <daniil@daniil.it>"]
|
||||
edition = "2021"
|
||||
|
||||
[dependencies]
|
||||
nicelocal-ext-php-rs = "0.10.4"
|
||||
ext-php-rs = "0.10.2"
|
||||
tokio = { version = "1", features = ["full"] }
|
||||
tokio-pipe = "^0.2"
|
||||
lazy_static = "1.4.0"
|
||||
|
@ -3,7 +3,7 @@ name = "php-tokio-derive"
|
||||
description = "Derive macros for php-tokio."
|
||||
repository = "https://github.com/danog/php-tokio"
|
||||
homepage = "https://github.com/danog/php-tokio"
|
||||
license = "AGPL-3.0-or-later"
|
||||
license = "Apache-2.0"
|
||||
version = "0.1.0"
|
||||
authors = ["Daniil Gentili <daniil@daniil.it>"]
|
||||
edition = "2021"
|
||||
|
@ -42,7 +42,7 @@ fn parser(input: ItemImpl) -> Result<TokenStream> {
|
||||
.collect::<Result<Vec<_>>>()?;
|
||||
|
||||
let output = quote! {
|
||||
#[::nicelocal_ext_php_rs::php_impl]
|
||||
#[::ext_php_rs::php_impl]
|
||||
impl #self_ty {
|
||||
#(#tokens)*
|
||||
}
|
||||
|
@ -10,6 +10,6 @@ crate-type = ["cdylib"]
|
||||
|
||||
[dependencies]
|
||||
php-tokio = "^0.1.2"
|
||||
nicelocal-ext-php-rs = { version = "^0.10.4", features = ["anyhow"] }
|
||||
ext-php-rs = { version = "^0.10.2", features = ["anyhow"] }
|
||||
reqwest = "^0.11"
|
||||
anyhow = "^1.0"
|
@ -1,4 +1,4 @@
|
||||
use nicelocal_ext_php_rs::prelude::*;
|
||||
use ext_php_rs::prelude::*;
|
||||
use php_tokio::{php_async_impl, EventLoop};
|
||||
|
||||
#[php_class]
|
||||
|
@ -17,7 +17,7 @@
|
||||
// Once the result of the Future is ready, tokio doesn't need it anymore,
|
||||
// the suspend_on function is resumed, and we safely drop the Future upon exiting.
|
||||
|
||||
use nicelocal_ext_php_rs::binary_slice::{BinarySlice, PackSlice};
|
||||
use ext_php_rs::binary_slice::{BinarySlice, PackSlice};
|
||||
|
||||
#[inline(always)]
|
||||
pub unsafe fn borrow_unchecked<
|
||||
|
@ -1,6 +1,6 @@
|
||||
use crate::borrow_unchecked::borrow_unchecked;
|
||||
use lazy_static::lazy_static;
|
||||
use nicelocal_ext_php_rs::{
|
||||
use ext_php_rs::{
|
||||
boxed::ZBox, call_user_func, prelude::*, types::ZendHashTable, zend::Function,
|
||||
};
|
||||
use std::{
|
||||
@ -134,7 +134,7 @@ impl EventLoop {
|
||||
sys_pipe().map_err(|err| format!("Could not create pipe: {}", err))?;
|
||||
|
||||
if !call_user_func!(
|
||||
Function::from_function("class_exists"),
|
||||
Function::try_from_function("class_exists").unwrap(),
|
||||
"\\Revolt\\EventLoop"
|
||||
)?
|
||||
.bool()
|
||||
@ -143,7 +143,7 @@ impl EventLoop {
|
||||
return Err(format!("\\Revolt\\EventLoop does not exist!").into());
|
||||
}
|
||||
if !call_user_func!(
|
||||
Function::from_function("interface_exists"),
|
||||
Function::try_from_function("interface_exists").unwrap(),
|
||||
"\\Revolt\\EventLoop\\Suspension"
|
||||
)?
|
||||
.bool()
|
||||
|
Loading…
Reference in New Issue
Block a user