Re: [libgpiod v2][PATCH v2 5/5] bindings: python: add the implementation for v2 API

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

 



On Thu, Jun 30, 2022 at 08:54:24AM +0200, Bartosz Golaszewski wrote:
> On Thu, Jun 30, 2022 at 4:25 AM Kent Gibson <warthog618@xxxxxxxxx> wrote:
> >
> > On Tue, Jun 28, 2022 at 10:42:26AM +0200, Bartosz Golaszewski wrote:
> > > This is the implementation of the new python API for libgpiod v2.
> > >
> >
> > [snip]
> >
> > > +     }
> > > +
> > > +     res = PyObject_Call(method, args, line_cfg_kwargs);
> > > +     Py_DECREF(args);
> > > +     Py_DECREF(method);
> > > +     if (!Py_IsNone(res)) {
> > > +             Py_DECREF(res);
> > > +             return NULL;
> > > +     }
> > > +
> >
> > Building against python 3.9 (the min required by configure.ac) gives:
> >
> > module.c:276:7: warning: implicit declaration of function ‘Py_IsNone’; did you mean ‘Py_None’? [-Wimplicit-function-declaration]
> >   276 |  if (!Py_IsNone(res)) {
> >       |       ^~~~~~~~~
> >       |       Py_None
> >
> >
> > Py_IsNone didn't get added to the Stable ABI until 3.10.
> >
> > Cheers,
> > Kent.
> 
> It seems like most distros still ship python 3.9, I don't want to make
> 3.10 the requirement. This can be replaced by `if (res != Py_None)`.
> Are there any more build issues?
> 

No, that was the only one.

Cheers,
Kent.



[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux