mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
Make _ctypes.c PY_SSIZE_T_CLEAN.
This commit is contained in:
parent
6f7e71dc32
commit
fffd939056
1 changed files with 4 additions and 2 deletions
|
@ -104,6 +104,8 @@ bytes(cdata)
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#define PY_SSIZE_T_CLEAN
|
||||||
|
|
||||||
#include "Python.h"
|
#include "Python.h"
|
||||||
#include "structmember.h"
|
#include "structmember.h"
|
||||||
|
|
||||||
|
@ -2293,7 +2295,7 @@ static PyObject *
|
||||||
CData_setstate(PyObject *_self, PyObject *args)
|
CData_setstate(PyObject *_self, PyObject *args)
|
||||||
{
|
{
|
||||||
void *data;
|
void *data;
|
||||||
int len;
|
Py_ssize_t len;
|
||||||
int res;
|
int res;
|
||||||
PyObject *dict, *mydict;
|
PyObject *dict, *mydict;
|
||||||
CDataObject *self = (CDataObject *)_self;
|
CDataObject *self = (CDataObject *)_self;
|
||||||
|
@ -3023,7 +3025,7 @@ CFuncPtr_FromVtblIndex(PyTypeObject *type, PyObject *args, PyObject *kwds)
|
||||||
char *name = NULL;
|
char *name = NULL;
|
||||||
PyObject *paramflags = NULL;
|
PyObject *paramflags = NULL;
|
||||||
GUID *iid = NULL;
|
GUID *iid = NULL;
|
||||||
int iid_len = 0;
|
Py_ssize_t iid_len = 0;
|
||||||
|
|
||||||
if (!PyArg_ParseTuple(args, "is|Oz#", &index, &name, ¶mflags, &iid, &iid_len))
|
if (!PyArg_ParseTuple(args, "is|Oz#", &index, &name, ¶mflags, &iid, &iid_len))
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue