fdReady: Use C99 bools / CBool in signature
ClosedPublic

Authored by nh2 on Sep 27 2017, 3:29 PM.

Diff Detail

Repository
rGHC Glasgow Haskell Compiler
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
nh2 created this revision.Sep 27 2017, 3:29 PM
Phyx edited edge metadata.Sep 27 2017, 3:51 PM

Aren't you missing #include <stdbool.h>?

nh2 updated this revision to Diff 14167.Sep 27 2017, 4:03 PM

Add import

nh2 added a comment.Sep 27 2017, 4:04 PM
In D4041#112998, @Phyx wrote:

Aren't you missing #include <stdbool.h>?

Yeah, the header imports brought it into scope from somewhere. Updated.

bgamari accepted this revision.Sep 27 2017, 5:29 PM

Looks good to me.

This revision is now accepted and ready to land.Sep 27 2017, 5:29 PM
syd added a subscriber: syd.Sep 29 2017, 8:46 AM
syd added inline comments.
libraries/base/cbits/inputReady.c
137

Do you want to make write a bool now?

167

Do you want to make this while(true) now?

222

Idem.

269

Idem

288

Idem

382

Idem

nh2 abandoned this revision.Nov 13 2017, 2:26 PM

I'm abandoning this diff and folding it directly into D4011 and D4012, as those are actually the only ones introducing int /* bool */ style ints (except from the signature of fdReady() itself, which has int isSock, but I'm not sure I'd want to change that signature).

nh2 reclaimed this revision.Nov 13 2017, 2:47 PM

but I'm not sure I'd want to change that signature

Actually, I do want to do that now (also as per review comments). Reopening and updating this Diff accordingly.

This revision is now accepted and ready to land.Nov 13 2017, 2:47 PM
nh2 updated this revision to Diff 14653.Nov 13 2017, 2:48 PM

Use bool in signature of fdReady()

nh2 updated this revision to Diff 14654.Nov 13 2017, 2:50 PM
nh2 marked an inline comment as done.

Also replace remaining while (1)

nh2 marked 5 inline comments as done.EditedNov 13 2017, 2:54 PM

What the hell, something messed up with arc again, wrong contents uploaded.

I wish I could just push a git branch, this manual updating using arc of Diffs after rebasing really invites mistakes ... :(

nh2 updated this revision to Diff 14656.Nov 13 2017, 3:41 PM

Fixing wrong arc upload

nh2 requested review of this revision.Nov 13 2017, 3:42 PM
nh2 updated this revision to Diff 14658.Nov 13 2017, 7:30 PM

Fix Windows build

nh2 updated this revision to Diff 14667.Nov 14 2017, 6:20 AM

Rebased

nh2 updated this revision to Diff 14788.Nov 23 2017, 1:03 PM

Rebase / cleanup

nh2 updated this revision to Diff 14817.Nov 25 2017, 11:40 AM

Rebased

nh2 updated this revision to Diff 14824.Nov 25 2017, 7:08 PM
nh2 retitled this revision from rts: fdReady(): Switch to C99 bools to fdReady: Use C99 bools / CBool in signature.
nh2 added a reviewer: simonmar.

Update description from commit message

bgamari accepted this revision.Nov 27 2017, 8:43 AM

Looks good to me.

This revision is now accepted and ready to land.Nov 27 2017, 8:43 AM
This revision was automatically updated to reflect the committed changes.