forked from xen-project/xen
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pygrub/fsimage: make it work with python 3
With the help of two porting guides and cpython source code: 1. Use PyBytes to replace PyString counterparts. 2. Use PyVarObject_HEAD_INIT. 3. Remove usage of Py_FindMethod. 4. Use new module initialisation routine. For xen-project#3, Py_FindMethod was removed, yet an alternative wasn't documented. The code is the result of reverse-engineering cpython commit 6116d4a1d1 https://docs.python.org/3/howto/cporting.html http://python3porting.com/cextensions.html Signed-off-by: Wei Liu <wei.liu2@citrix.com> Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
- Loading branch information
Wei Liu
authored and
Eric Chanudet
committed
May 4, 2021
1 parent
2fb694e
commit ca26070
Showing
1 changed file
with
69 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters