From 31fa85f22e98ae8fe98243dfcd2a3e0245ab07a8 Mon Sep 17 00:00:00 2001 From: blueloveTH Date: Wed, 26 Jun 2024 16:39:17 +0800 Subject: [PATCH] some fix --- include/pocketpy/pocketpy.h | 4 ++-- src/public/stackops.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/pocketpy/pocketpy.h b/include/pocketpy/pocketpy.h index 3f298c90..3e1fc3b0 100644 --- a/include/pocketpy/pocketpy.h +++ b/include/pocketpy/pocketpy.h @@ -105,8 +105,8 @@ int py_getattr(const py_Ref self, py_Name name, py_Ref out); /// Sets the attribute of the object. int py_setattr(py_Ref self, py_Name name, const py_Ref val); -/// Copies src's value to dst, equivalent to `*dst = *src`. -void py_assign(const py_Ref src, py_Ref dst); +/// Equivalent to `*dst = *src`. +void py_assign(py_Ref dst, const py_Ref src); /************* Stack Operations *************/ py_Ref py_gettop(); diff --git a/src/public/stackops.c b/src/public/stackops.c index b3b7ac17..3bd24793 100644 --- a/src/public/stackops.c +++ b/src/public/stackops.c @@ -27,7 +27,7 @@ void py_setslot(py_Ref self, int i, const py_Ref val){ PyObject__slots(self->_obj)[i] = *val; } -void py_assign(const py_Ref src, py_Ref dst){ +void py_assign(py_Ref dst, const py_Ref src){ *dst = *src; }