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

Method __init__

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

Source from the content-addressed store, hash-verified

126 _own: bool
127
128 def __init__(self, handle: Optional[MaaStringListBufferHandle] = None):
129 self._set_api_properties()
130
131 if handle:
132 self._handle = handle
133 self._own = False
134 else:
135 self._handle = Library.framework().MaaStringListBufferCreate()
136 self._own = True
137
138 if not self._handle:
139 raise RuntimeError("Failed to create string list buffer.")
140
141 def __del__(self):
142 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