We mark all protocols with their type using MP_PROTO_IMPLEMENT,
and checking in mp_get_stream{,_raise}.
This was not turning up as a problem in tests until a (new, not yet
commited) change to jpegio caused a segfault because a type implementing
a different protocol was passed in to mp_get_stream.
By using 0 (instead of MP_QSTR_protocol_stream) as the marker for
objects implementing the standard micropython stream protocol, the
number of CIRCUITPY-CHANGEs is minimized.
|
||
|---|---|---|
| .. | ||
| __init__.c | ||
| __init__.h | ||
| Serial.c | ||
| Serial.h | ||