MCPcopy Create free account
hub / github.com/MaaXYZ/MaaFramework / __init__

Method __init__

source/binding/Python/maa/buffer.py:21–32  ·  view source on GitHub ↗
(self, handle: Optional[MaaStringBufferHandle] = None)

Source from the content-addressed store, hash-verified

19 _own: bool
20
21 def __init__(self, handle: Optional[MaaStringBufferHandle] = None):
22 self._set_api_properties()
23
24 if handle:
25 self._handle = handle
26 self._own = False
27 else:
28 self._handle = Library.framework().MaaStringBufferCreate()
29 self._own = True
30
31 if not self._handle:
32 raise RuntimeError("Failed to create string buffer.")
33
34 def __del__(self):
35 if self._handle and self._own:

Callers

nothing calls this directly

Calls 2

_set_api_propertiesMethod · 0.95
frameworkMethod · 0.80

Tested by

no test coverage detected