Re: [Xen-devel] [PATCH for-next RFC 4/4] pygrub: make it build with python 3

2019-03-06 Thread Wei Liu
On Tue, Mar 05, 2019 at 04:42:06PM +, Wei Liu wrote: > + > PyMODINIT_FUNC > initxenfsimage(void) So Python 3 requires the initialisation function to be called PyInit_xenfsimage, otherwise it can't find the entry point of this module. I have fixed this in my next version. Wei. > { > +#if

Re: [Xen-devel] [PATCH for-next RFC 4/4] pygrub: make it build with python 3

2019-03-06 Thread Wei Liu
On Tue, Mar 05, 2019 at 07:17:07PM +0100, Marek Marczykowski-Górecki wrote: > On Tue, Mar 05, 2019 at 05:48:10PM +, Wei Liu wrote: > > On Tue, Mar 05, 2019 at 05:42:07PM +, Andrew Cooper wrote: > > > On 05/03/2019 16:42, Wei Liu wrote: > > > > With the help of two porting guides and cpython

Re: [Xen-devel] [PATCH for-next RFC 4/4] pygrub: make it build with python 3

2019-03-05 Thread Marek Marczykowski-Górecki
On Tue, Mar 05, 2019 at 05:48:10PM +, Wei Liu wrote: > On Tue, Mar 05, 2019 at 05:42:07PM +, Andrew Cooper wrote: > > On 05/03/2019 16:42, Wei Liu wrote: > > > With the help of two porting guides and cpython source code: > > > > > > 1. Use PyUnicode to replace PyString counterparts. > > > 2

Re: [Xen-devel] [PATCH for-next RFC 4/4] pygrub: make it build with python 3

2019-03-05 Thread Wei Liu
On Tue, Mar 05, 2019 at 05:42:07PM +, Andrew Cooper wrote: > On 05/03/2019 16:42, Wei Liu wrote: > > With the help of two porting guides and cpython source code: > > > > 1. Use PyUnicode to replace PyString counterparts. > > 2. Use PyVarObject_HEAD_INIT and provide compatibility for 2.5 and > >

Re: [Xen-devel] [PATCH for-next RFC 4/4] pygrub: make it build with python 3

2019-03-05 Thread Andrew Cooper
On 05/03/2019 16:42, Wei Liu wrote: > With the help of two porting guides and cpython source code: > > 1. Use PyUnicode to replace PyString counterparts. > 2. Use PyVarObject_HEAD_INIT and provide compatibility for 2.5 and >earlier. > 3. Remove usage of Py_FindMethod. > 4. Use new module initia

[Xen-devel] [PATCH for-next RFC 4/4] pygrub: make it build with python 3

2019-03-05 Thread Wei Liu
With the help of two porting guides and cpython source code: 1. Use PyUnicode to replace PyString counterparts. 2. Use PyVarObject_HEAD_INIT and provide compatibility for 2.5 and earlier. 3. Remove usage of Py_FindMethod. 4. Use new module initialisation routine. For #3, Py_FindMethod was remo