[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] tools/python: change 's#' size type for Python >= 3.10



On Thu, Jan 26, 2023 at 10:14:54AM +0100, Jan Beulich wrote:
> On 26.01.2023 06:13, Marek Marczykowski-Górecki wrote:
> > @@ -1774,7 +1775,7 @@ static PyObject *pyflask_load(PyObject *self, 
> > PyObject *args, PyObject *kwds)
> >  {
> >      xc_interface *xc_handle;
> >      char *policy;
> > -    uint32_t len;
> > +    Py_ssize_t len;
> 
> I find this suspicious - by the name, this is a signed type when an
> unsigned one was used here before (and properly, imo).

It is suspicious indeed, but correct according to the documentation:
https://docs.python.org/3/c-api/arg.html#strings-and-buffers

> Irrespective of the remark of course I'll leave acking (or not) of this
> to people knowing Python better than I do.
> 
> Jan

-- 
Best Regards,
Marek Marczykowski-Górecki
Invisible Things Lab

Attachment: signature.asc
Description: PGP signature


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.