Skip to content

Commit

Permalink
Fixed issues with HPySlice_New comment and test
Browse files Browse the repository at this point in the history
  • Loading branch information
Du Toit Spies committed Jun 7, 2024
1 parent 9d59d56 commit 7fdbca1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
8 changes: 3 additions & 5 deletions hpy/tools/autogen/public_api.h
Original file line number Diff line number Diff line change
Expand Up @@ -965,13 +965,11 @@ HPy HPyTuple_FromArray(HPyContext *ctx, const HPy items[], HPy_ssize_t n);
* The execution context.
*
* :param start:
* A pointer to a variable where to write the unpacked slice start. Must not
* be ``NULL``.
* A handle to an object to be used as the slice start value.
* :param end:
* A pointer to a variable where to write the unpacked slice end. Must not
* A handle to an object to be used as the slice end value.
* :param step:
* A pointer to a variable where to write the unpacked slice step. Must not
* be ``NULL``.
* A handle to an object to be used as the slice step value.
*
* :returns:
* A handle to the new and empty Python slice object or ``HPy_NULL`` in case
Expand Down
3 changes: 1 addition & 2 deletions test/test_hpyslice.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,7 @@ def test_new(self):
&start, &stop, &step) < 0) {
return HPy_NULL;
}
HPy length = HPySlice_New(ctx, start, stop, step);
return length;
return HPySlice_New(ctx, start, stop, step);
}
@EXPORT(f)
@INIT
Expand Down

0 comments on commit 7fdbca1

Please sign in to comment.