MCPcopy Create free account
hub / github.com/caverav/flutterdec / _pool_entries

Function _pool_entries

adapters/python/adapter_template.py:258–284  ·  view source on GitHub ↗
(strings: List[str])

Source from the content-addressed store, hash-verified

256 "extensions": {},
257 }
258
259
260def _ordinal_pool(entries: List[dict]) -> dict:
261 """A pool whose indexes are positions in a list, not hardware slots.
262
263 `geometry` is absent and the index space is separately reported unavailable,
264 so a `ldr xN, [x27, #disp]` cannot be resolved through these.
265 """
266 return {"index_space": "ordinal", "geometry": None, "entries": entries}
267
268
269def _empty_pool() -> dict:
270 return _ordinal_pool([])
271
272
273# --------------------------------------------------------------------------
274# shared extraction
275# --------------------------------------------------------------------------
276
277
278def _extract_strings(data: bytes, min_len: int = 5, max_items: int = 20000) -> List[str]:
279 out: List[str] = []
280 for m in re.finditer(rb"[ -~]{%d,}" % min_len, data):
281 s = m.group(0).decode("utf-8", errors="ignore")
282 if len(s) > 220:
283 continue
284 if not _usable_value(s):
285 continue
286 out.append(s)
287 if len(out) >= max_items:

Callers 2

_build_blutter_modelFunction · 0.85
entrypointFunction · 0.85

Calls 1

_selector_from_stringFunction · 0.85

Tested by

no test coverage detected