Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(runtime): return number from op_ppid instead of bigint #22169

Merged
merged 4 commits into from
Jan 30, 2024

Conversation

magurotuna
Copy link
Member

Fixes #22166

@magurotuna magurotuna marked this pull request as ready for review January 29, 2024 06:03
@magurotuna magurotuna changed the title fix(runtime): change the return type of op_ppid from i64 to u32 fix(runtime): change the return type of op_ppid from i64 to i32 Jan 29, 2024
@magurotuna magurotuna force-pushed the magurotuna/issue22166 branch from 9c1ced8 to d937aaf Compare January 29, 2024 06:30
@@ -32,8 +32,8 @@ fn op_main_module(state: &mut OpState) -> Result<String, AnyError> {
/// This is an op instead of being done at initialization time because
/// it's expensive to retrieve the ppid on Windows.
#[op2(fast)]
#[bigint]
Copy link
Contributor

@mmastrac mmastrac Jan 29, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can keep this as i64 and use #[number] here to force it to return an integer-like number up to MAX_SAFE_INTEGER

Copy link
Contributor

@mmastrac mmastrac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@magurotuna magurotuna changed the title fix(runtime): change the return type of op_ppid from i64 to i32 fix(runtime): return number from op_ppid instead of bigint Jan 29, 2024
@magurotuna magurotuna merged commit ab8b1b1 into denoland:main Jan 30, 2024
14 checks passed
@magurotuna magurotuna deleted the magurotuna/issue22166 branch January 30, 2024 06:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Deno.ppid returns bigint, although type declarations says it's number
2 participants