Skip to content

Commit 5fbe6d4

Browse files
authored
Merge pull request #5050 from cwalther/getprevtraceback-cleanup
Remove addressed TODO comments
2 parents 108a9f2 + 0bdff4f commit 5fbe6d4

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

shared-bindings/supervisor/__init__.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -267,14 +267,13 @@ MP_DEFINE_CONST_FUN_OBJ_0(supervisor_ticks_ms_obj, supervisor_ticks_ms);
267267
//| ...
268268
//|
269269
STATIC mp_obj_t supervisor_get_previous_traceback(void) {
270-
// TODO is this a safe and proper way of making a heap-allocated string object that points at long-lived (and likely long and unique) data outside the heap?
271270
if (prev_traceback_allocation) {
272271
size_t len = strlen((const char *)prev_traceback_allocation->ptr);
273272
if (len > 0) {
274273
mp_obj_str_t *o = m_new_obj(mp_obj_str_t);
275274
o->base.type = &mp_type_str;
276275
o->len = len;
277-
// TODO is it a good assumption that callers probably aren't going to compare this string, so skip computing the hash?
276+
// callers probably aren't going to compare this string, so skip computing the hash
278277
o->hash = 0;
279278
o->data = (const byte *)prev_traceback_allocation->ptr;
280279
return MP_OBJ_FROM_PTR(o);

0 commit comments

Comments
 (0)