Skip to content

Implement Iterator.prototype.take#676

Merged
saghul merged 3 commits intomasterfrom
iterator-helpers-take
Nov 12, 2024
Merged

Implement Iterator.prototype.take#676
saghul merged 3 commits intomasterfrom
iterator-helpers-take

Conversation

@saghul
Copy link
Copy Markdown
Contributor

@saghul saghul commented Nov 11, 2024

No description provided.

@saghul saghul requested a review from bnoordhuis November 11, 2024 22:26
JSIteratorHelperData *it;
JSValue ret;

*pdone = FALSE;
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This should fix the unitialized jump valgrind caught: https://github.com/quickjs-ng/quickjs/actions/runs/11786411039/job/32829640312

quickjs.c Outdated
Comment on lines +40403 to +40405
if (limit < 0)
fail:
return JS_ThrowRangeError(ctx, "must be positive");
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
if (limit < 0)
fail:
return JS_ThrowRangeError(ctx, "must be positive");
if (limit < 0) {
fail:
return JS_ThrowRangeError(ctx, "must be positive");
}

(dominant style for this kind of thing)

@saghul saghul merged commit 0362c0a into master Nov 12, 2024
@saghul saghul deleted the iterator-helpers-take branch November 12, 2024 07:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants