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

integer value cannot be coerced to type 'c_long' in os.nanosleep() #8488

Open
Tracked by #8
s-ol opened this issue Apr 10, 2021 · 0 comments
Open
Tracked by #8

integer value cannot be coerced to type 'c_long' in os.nanosleep() #8488

s-ol opened this issue Apr 10, 2021 · 0 comments
Labels
bug Observed behavior contradicts documented or intended behavior os-windows standard library This issue involves writing Zig code for the standard library.
Milestone

Comments

@s-ol
Copy link
Contributor

s-ol commented Apr 10, 2021

$ zig build
D:\Program Files\zig\lib\std\os.zig:4282:67: error: integer value 9223372036854775807 cannot be coerced to type 'c_long'
        .tv_nsec = math.cast(isize, nanoseconds) catch math.maxInt(isize),

The function is invoked simply as std.os.nanosleep(0, 250_000_000);

$ zig version
0.7.1

I downloaded zig-windows-x86_64-0.7.1.zip from the zig website.

@Vexu Vexu added os-windows standard library This issue involves writing Zig code for the standard library. bug Observed behavior contradicts documented or intended behavior labels Apr 11, 2021
@Vexu Vexu added this to the 0.9.0 milestone Apr 11, 2021
@andrewrk andrewrk modified the milestones: 0.9.0, 0.10.0 May 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Observed behavior contradicts documented or intended behavior os-windows standard library This issue involves writing Zig code for the standard library.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants