mirror of https://github.com/mgba-emu/mgba.git
Python: Add VFS.fromEmpty utility
This commit is contained in:
parent
c7d50956b3
commit
7020ea35a3
|
@ -115,6 +115,10 @@ class VFile:
|
||||||
self._no_gc = _no_gc
|
self._no_gc = _no_gc
|
||||||
self._claimed = False
|
self._claimed = False
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def fromEmpty():
|
||||||
|
return VFile(lib.VFileMemChunk(ffi.NULL, 0))
|
||||||
|
|
||||||
def __del__(self):
|
def __del__(self):
|
||||||
if not self._claimed:
|
if not self._claimed:
|
||||||
self.close()
|
self.close()
|
||||||
|
|
Loading…
Reference in New Issue