Skip to content

Commit

Permalink
Update and adapt phper. (#66)
Browse files Browse the repository at this point in the history
  • Loading branch information
jmjoy authored Apr 15, 2023
1 parent b3e7290 commit cbb98fe
Show file tree
Hide file tree
Showing 9 changed files with 23 additions and 23 deletions.
20 changes: 10 additions & 10 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ futures-util = "0.3.27"
hostname = "0.3.1"
libc = "0.2.140"
once_cell = "1.17.1"
phper = "0.10.2"
phper = "0.11.0"
prost = "0.11.8"
serde_json = { version = "1.0.94", features = ["preserve_order"] }
skywalking = { version = "0.6.0", features = ["management"] }
Expand Down
10 changes: 5 additions & 5 deletions dist-material/LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -578,11 +578,11 @@ MulanPSL-2.0 licenses
The following components are provided under the MulanPSL-2.0 License. See project link for details.
The text of each license is also included in licenses/LICENSE-[project].txt.

https://crates.io/crates/phper/0.10.2 0.10.2 MulanPSL-2.0
https://crates.io/crates/phper-alloc/0.10.2 0.10.2 MulanPSL-2.0
https://crates.io/crates/phper-build/0.10.2 0.10.2 MulanPSL-2.0
https://crates.io/crates/phper-macros/0.10.2 0.10.2 MulanPSL-2.0
https://crates.io/crates/phper-sys/0.10.2 0.10.2 MulanPSL-2.0
https://crates.io/crates/phper/0.11.0 0.11.0 MulanPSL-2.0
https://crates.io/crates/phper-alloc/0.11.0 0.11.0 MulanPSL-2.0
https://crates.io/crates/phper-build/0.11.0 0.11.0 MulanPSL-2.0
https://crates.io/crates/phper-macros/0.11.0 0.11.0 MulanPSL-2.0
https://crates.io/crates/phper-sys/0.11.0 0.11.0 MulanPSL-2.0

========================================================================
Unlicense licenses
Expand Down
2 changes: 1 addition & 1 deletion src/execute.rs
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ fn infer_request_id(execute_data: &mut ExecuteData) -> Option<i64> {
prev_execute_data_ptr = unsafe { (*prev_execute_data_ptr).prev_execute_data };
continue;
}
let Some(request) = prev_execute_data.get_parameter(0).as_mut_z_obj() else {
let Some(request) = prev_execute_data.get_mut_parameter(0).as_mut_z_obj() else {
return None;
};
match request.get_mut_property("fd").as_long() {
Expand Down
2 changes: 1 addition & 1 deletion src/plugin/plugin_amqplib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ impl AmqplibPlugin {
let sw_header = RequestContext::try_get_sw_header(request_id)?;

let message = execute_data
.get_parameter(0)
.get_mut_parameter(0)
.as_mut_z_obj()
.context("message isn't object")?;

Expand Down
2 changes: 1 addition & 1 deletion src/plugin/plugin_curl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ impl CurlPlugin {
let options = execute_data.get_parameter(1).as_long();

if options == Some(SKY_CURLOPT_HTTPHEADER) {
*execute_data.get_parameter(1) = CURLOPT_HTTPHEADER.into();
*execute_data.get_mut_parameter(1) = CURLOPT_HTTPHEADER.into();
} else if options == Some(CURLOPT_HTTPHEADER) {
let value = execute_data.get_parameter(2);
if value.get_type_info().is_array() {
Expand Down
2 changes: 1 addition & 1 deletion src/plugin/plugin_predis.rs
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ impl PredisPlugin {
let peer = format!("{}:{}", host, port);

let handle = this.handle();
let command = execute_data.get_parameter(0).expect_mut_z_obj()?;
let command = execute_data.get_mut_parameter(0).expect_mut_z_obj()?;
let command_class_name = command
.get_class()
.get_name()
Expand Down
4 changes: 2 additions & 2 deletions src/plugin/plugin_redis.rs
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ impl RedisPlugin {
}

let host = {
let mut f = || {
let f = || {
Ok::<_, anyhow::Error>(
execute_data
.get_parameter(0)
Expand All @@ -236,7 +236,7 @@ impl RedisPlugin {
}
};
let port = {
let mut f = || {
let f = || {
execute_data
.get_parameter(1)
.as_long()
Expand Down
2 changes: 1 addition & 1 deletion src/plugin/plugin_swoole.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ impl SwooleServerPlugin {

// Hack the closure with the
// [`crate::request::skywalking_hack_swoole_on_request`].
let closure = execute_data.get_parameter(1);
let closure = execute_data.get_mut_parameter(1);
let ori_closure = replace(
closure,
ZVal::from(ZString::new(
Expand Down

0 comments on commit cbb98fe

Please # to comment.