MCPcopy Create free account
hub / github.com/ELMERIKH/PyinMemoryPE / buffer

Function buffer

windows/utils/improved_buffer.py:117–123  ·  view source on GitHub ↗
(obj, eltclass=None)

Source from the content-addressed store, hash-verified

115 return PartialBufferType.create_real_implem(type, int(nbelt))
116
117def buffer(obj, eltclass=None):
118 if eltclass is None: # Guess
119 obj = list(obj)
120 item = obj[0]
121 eltclass = type(item) # All object must have the same type
122 dlen = len(obj)
123 return BUFFER(eltclass, dlen)(*obj)
124
125def resized_array(array, newnbelt, newtype=None):
126 if newtype is None:

Callers 4

bindMethod · 0.85
forge_alpc_requestMethod · 0.85
_forge_call_requestMethod · 0.85
_forge_bind_requestMethod · 0.85

Calls 1

BUFFERFunction · 0.85

Tested by

no test coverage detected