Skip to content

Commit

Permalink
fix return type
Browse files Browse the repository at this point in the history
  • Loading branch information
waahm7 committed Sep 23, 2024
1 parent b3d571e commit 0d591fa
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion source/module.c
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,7 @@ PyObject *aws_py_weakref_get_ref(PyObject *object) {
return self;
}

PyObject *aws_py_weakref_release_ref(PyObject *object) {
void aws_py_weakref_release_ref(PyObject *object) {
(void)object;
/* Python versions before 3.13 returns a borrowed reference */
#if PY_VERSION_HEX >= 0x030D0000
Expand Down
4 changes: 2 additions & 2 deletions source/module.h
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,10 @@ PyObject *aws_py_get_error_message(PyObject *self, PyObject *args);
PyObject *aws_py_memory_view_from_byte_buffer(struct aws_byte_buf *buf);

/* Python 3.13+ changed the function to get a reference from WeakRef. This function is an abstraction over two different
* APIs since we support Python versions before 3.13. */
* APIs since we support Python versions before 3.13.*/
PyObject *aws_py_weakref_get_ref(PyObject *object);
/* Release the weakwef provided by the `aws_py_weakref_get_ref`. */
PyObject *aws_py_weakref_release_ref(PyObject *object);
void aws_py_weakref_release_ref(PyObject *object);

/* Allocator that calls into PyObject_[Malloc|Free|Realloc] */
struct aws_allocator *aws_py_get_allocator(void);
Expand Down

0 comments on commit 0d591fa

Please sign in to comment.