distribution/packages/emulators/libretro/mame2015-lr/patches/001-python-3.11.patch
2023-03-17 21:06:43 +00:00

57 lines
2.5 KiB
Diff

diff -rupN mame2015.orig/src/emu/cpu/m6502/m6502make.py mame2015/src/emu/cpu/m6502/m6502make.py
--- mame2015.orig/src/emu/cpu/m6502/m6502make.py 2022-12-06 11:09:35.970767689 -0500
+++ mame2015/src/emu/cpu/m6502/m6502make.py 2022-12-06 11:10:17.918361583 -0500
@@ -16,7 +16,7 @@ def load_opcodes(fname):
opcodes = []
logging.info("load_opcodes: %s", fname)
try:
- f = open(fname, "rU")
+ f = open(fname, "r")
except Exception:
err = sys.exc_info()[1]
logging.error("cannot read opcodes file %s [%s]", fname, err)
@@ -39,7 +39,7 @@ def load_disp(fname):
logging.info("load_disp: %s", fname)
states = []
try:
- f = open(fname, "rU")
+ f = open(fname, "r")
except Exception:
err = sys.exc_info()[1]
logging.error("cannot read display file %s [%s]", fname, err)
diff -rupN mame2015.orig/src/emu/cpu/m6809/m6809make.py mame2015/src/emu/cpu/m6809/m6809make.py
--- mame2015.orig/src/emu/cpu/m6809/m6809make.py 2022-12-06 11:09:35.974767650 -0500
+++ mame2015/src/emu/cpu/m6809/m6809make.py 2022-12-06 11:10:02.046515086 -0500
@@ -14,7 +14,7 @@ def load_file(fname, lines):
if path != "":
path += '/'
try:
- f = open(fname, "rU")
+ f = open(fname, "r")
except Exception:
err = sys.exc_info()[1]
sys.stderr.write("Cannot read opcodes file %s [%s]\n" % (fname, err))
diff -rupN mame2015.orig/src/emu/cpu/mcs96/mcs96make.py mame2015/src/emu/cpu/mcs96/mcs96make.py
--- mame2015.orig/src/emu/cpu/mcs96/mcs96make.py 2022-12-06 11:09:35.974767650 -0500
+++ mame2015/src/emu/cpu/mcs96/mcs96make.py 2022-12-06 11:10:07.230464929 -0500
@@ -71,7 +71,7 @@ class OpcodeList:
self.ea = {}
self.macros = {}
try:
- f = open(fname, "rU")
+ f = open(fname, "r")
except Exception:
err = sys.exc_info()[1]
sys.stderr.write("Cannot read opcodes file %s [%s]\n" % (fname, err))
diff -rupN mame2015.orig/src/emu/cpu/tms57002/tmsmake.py mame2015/src/emu/cpu/tms57002/tmsmake.py
--- mame2015.orig/src/emu/cpu/tms57002/tmsmake.py 2022-12-06 11:09:35.982767573 -0500
+++ mame2015/src/emu/cpu/tms57002/tmsmake.py 2022-12-06 11:10:24.850294595 -0500
@@ -326,7 +326,7 @@ def ins_cmp_dasm(a, b):
def LoadLst(filename):
instructions = []
ins = None
- for n, line in enumerate(open(filename, "rU")):
+ for n, line in enumerate(open(filename, "r")):
line = line.rstrip()
if not line and ins:
# new lines separate intructions