all repos — mgba @ 7020ea35a312967ff1e0cb0e4e7a4267149f0e29

mGBA Game Boy Advance Emulator

Python: Add VFS.fromEmpty utility
Vicki Pfau vi@endrift.com
Mon, 24 Aug 2020 01:59:28 -0700
commit

7020ea35a312967ff1e0cb0e4e7a4267149f0e29

parent

c7d50956b3ce957f370072b8fb60e259a79a75ea

1 files changed, 4 insertions(+), 0 deletions(-)

jump to
M src/platform/python/mgba/vfs.pysrc/platform/python/mgba/vfs.py

@@ -115,6 +115,10 @@ self.handle = vf

self._no_gc = _no_gc self._claimed = False + @staticmethod + def fromEmpty(): + return VFile(lib.VFileMemChunk(ffi.NULL, 0)) + def __del__(self): if not self._claimed: self.close()