Skip to content

Commit

Permalink
Fix _get_pushes_fd and _get_pulls_fd method signatures
Browse files Browse the repository at this point in the history
Getters are supposed to have signature "PyObject *(PyObject *self, void *closure)", but the closure argument is often not used.
In wasm it causes a trap if a function is declared with one argument and then called with two.
  • Loading branch information
Hood committed Nov 15, 2021
1 parent be4c59d commit 7a93328
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/decode.c
Expand Up @@ -235,7 +235,7 @@ _setfd(ImagingDecoderObject *decoder, PyObject *args) {
}

static PyObject *
_get_pulls_fd(ImagingDecoderObject *decoder) {
_get_pulls_fd(ImagingDecoderObject *decoder, void *closure) {
return PyBool_FromLong(decoder->pulls_fd);
}

Expand Down
2 changes: 1 addition & 1 deletion src/encode.c
Expand Up @@ -299,7 +299,7 @@ _setfd(ImagingEncoderObject *encoder, PyObject *args) {
}

static PyObject *
_get_pushes_fd(ImagingEncoderObject *encoder) {
_get_pushes_fd(ImagingEncoderObject *encoder, void *closure) {
return PyBool_FromLong(encoder->pushes_fd);
}

Expand Down

0 comments on commit 7a93328

Please sign in to comment.