Skip to content
This repository has been archived by the owner on Feb 24, 2024. It is now read-only.

Use Py_ssize_t type #89

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
Use Py_ssize_t type
Python 3.10 requires that the `Py_ssize_t` type is used for string lengths instead of `int`.
stevenpackardblp authored Oct 25, 2021
commit 1e1666af51bb11ea5c6dd442415ce765073737c3
7 changes: 4 additions & 3 deletions src/kerberos.c
Original file line number Diff line number Diff line change
@@ -14,6 +14,7 @@
* limitations under the License.
**/

#define PY_SSIZE_T_CLEAN
#include <Python.h>

#include "kerberosbasic.h"
@@ -244,9 +245,9 @@ static PyObject *channelBindings(PyObject *self, PyObject *args, PyObject* keywd
char *initiator_address = NULL;
char *acceptor_address = NULL;
char *application_data = NULL;
int initiator_length = 0;
int acceptor_length = 0;
int application_length = 0;
Py_ssize_t initiator_length = 0;
Py_ssize_t acceptor_length = 0;
Py_ssize_t application_length = 0;

PyObject *pychan_bindings = NULL;
struct gss_channel_bindings_struct *input_chan_bindings;