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

ReadFileToString fix and not using bools in deno.h #260

Merged
merged 3 commits into from
Jun 15, 2018
Merged

Conversation

ry
Copy link
Member

@ry ry commented Jun 15, 2018

No description provided.

ry added 2 commits June 15, 2018 15:12
@ry ry requested a review from piscisaureus June 15, 2018 15:50
@ry ry changed the title File util and not using bools in deno.h ReadFileToString fix and not using bools in deno.h Jun 15, 2018
Copy link
Member

@piscisaureus piscisaureus left a comment

Choose a reason for hiding this comment

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

LGTM


// Routes message to the javascript callback set with deno_sub(). A false return
// value indicates error. Check deno_last_exception() for exception text.
bool deno_pub(Deno* d, const char* channel, deno_buf buf);
// 0 = fail, 1 = success
int deno_pub(Deno* d, const char* channel, deno_buf buf);
Copy link
Member

Choose a reason for hiding this comment

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

Understandable since this function was returning bool before.
However going forward I'd like to use the common pattern that >= indicates success and <0 means failure.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah - it bothers me too. I'll change it on the next iteration.

@ry ry merged commit 3047986 into master Jun 15, 2018
@ry ry deleted the file_util_fix branch June 15, 2018 20:19
piscisaureus pushed a commit to piscisaureus/deno that referenced this pull request Oct 7, 2019
humancalico pushed a commit to humancalico/deno that referenced this pull request Aug 24, 2020
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.

None yet

2 participants