Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/aomodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -364,11 +364,12 @@ py_ao_play(ao_Object *self, PyObject *args)
const char *samples;
char *output_samples;
uint_32 num_bytes = 0;
int len;

#if PY_MAJOR_VERSION >= 3
Py_ssize_t len;
if (!(PyArg_ParseTuple(args, "y#|O&", &samples, &len, uint_32_obj, &num_bytes)))
#else
int len;
if (!(PyArg_ParseTuple(args, "s#|O&", &samples, &len, uint_32_obj, &num_bytes)))
#endif
return NULL;
Expand Down
2 changes: 2 additions & 0 deletions src/aomodule.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
#ifndef __AO_MODULE_H__
#define __AO_MODULE_H__

#define PY_SSIZE_T_CLEAN

#include <Python.h>
#include <structmember.h>
#include <ao/ao.h>
Expand Down