@@ -150,7 +150,7 @@ def _parse_advertisement_data(
150150 data : bytes ,
151151) -> BLEGAPAdvertisement :
152152 """Parse advertisement data and return a BLEGAPAdvertisement."""
153- return _uncached_parse_advertisement_data (data )
153+ return _parse_advertisement_data_miss_via_bytes (data )
154154
155155
156156_cached_parse_advertisement_data = _parse_advertisement_data
@@ -183,17 +183,17 @@ def parse_advertisement_data(
183183 return _cached_parse_advertisement_data (b"" .join (data ))
184184
185185
186- def _uncached_parse_advertisement_data (data : bytes ) -> BLEGAPAdvertisement :
186+ def _parse_advertisement_data_miss_via_bytes (data : bytes ) -> BLEGAPAdvertisement :
187187 # Route BLEGAPAdvertisement-cache misses through the bytes-keyed cache
188- # (symmetric with _uncached_parse_advertisement_tuple , see #261). Identical
189- # payloads reaching this miss path skip the full parse when the bytes-tuple
190- # cache already holds the result, and a true miss populates that cache so
191- # subsequent parse_advertisement_data_bytes / parse_advertisement_data_tuple
192- # calls on the same payload also win.
188+ # (symmetric with _parse_advertisement_tuple_miss_via_bytes , see #261).
189+ # Identical payloads reaching this miss path skip the full parse when the
190+ # bytes-tuple cache already holds the result, and a true miss populates
191+ # that cache so subsequent parse_advertisement_data_bytes /
192+ # parse_advertisement_data_tuple calls on the same payload also win.
193193 return BLEGAPAdvertisement (* parse_advertisement_data_bytes (data ))
194194
195195
196- def _uncached_parse_advertisement_tuple (
196+ def _parse_advertisement_tuple_miss_via_bytes (
197197 data : tuple [bytes , ...],
198198) -> BLEGAPAdvertisementTupleType :
199199 # Route tuple-cache misses through the bytes-keyed cache so identical
@@ -386,11 +386,11 @@ def parse_advertisement_data_tuple(
386386 manufacturer_data: dict[int, bytes]
387387 tx_power: int | None
388388 """
389- return _uncached_parse_advertisement_tuple (data )
389+ return _parse_advertisement_tuple_miss_via_bytes (data )
390390else :
391391 parse_advertisement_data_bytes = lru_cache (maxsize = 1024 )(
392392 _uncached_parse_advertisement_bytes
393393 )
394394 parse_advertisement_data_tuple = lru_cache (maxsize = 256 )(
395- _uncached_parse_advertisement_tuple
395+ _parse_advertisement_tuple_miss_via_bytes
396396 )
0 commit comments