From 7fdbca11cbfd5f8acd2ade432bd48d9cb890d9bb Mon Sep 17 00:00:00 2001 From: Du Toit Spies Date: Fri, 7 Jun 2024 16:11:46 +0200 Subject: [PATCH] Fixed issues with HPySlice_New comment and test --- hpy/tools/autogen/public_api.h | 8 +++----- test/test_hpyslice.py | 3 +-- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/hpy/tools/autogen/public_api.h b/hpy/tools/autogen/public_api.h index a0360122..b081d943 100644 --- a/hpy/tools/autogen/public_api.h +++ b/hpy/tools/autogen/public_api.h @@ -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 diff --git a/test/test_hpyslice.py b/test/test_hpyslice.py index 48d474ff..97f45b77 100644 --- a/test/test_hpyslice.py +++ b/test/test_hpyslice.py @@ -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