Skip to content

Commit 9599677

Browse files
committed
Comment typo and cleanup
1 parent 7f7590b commit 9599677

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/core.cpp

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,14 @@ bool upyOpenCVBoot() {
4444

4545
// Initializes `StdMatAllocator` on the C heap, see:
4646
// https://github.com/sparkfun/micropython-opencv/issues/17
47+
//
4748
// Alternatively, we could set the NumpyAllocator as the default Mat
48-
// allocator with Mat::setDefaultAllocator(&GetNumpyAllocator()),
49+
// allocator with `Mat::setDefaultAllocator(&GetNumpyAllocator())`,
4950
// however that actually causes some issues. For example, Canny()
50-
// creates an temporary 64-bit float Mat, which is not supported by
51-
// ulab NumPy and therefore fails if we use the NumpyAllocator. The
52-
// StdMatAllocator is fine, because it calls `malloc()`, which we catch
53-
// with `__wrap_malloc()` to ensure the data is allocated on the GC heap
51+
// creates a temporary 64-bit float Mat, which is not supported by ulab
52+
// NumPy and therefore fails with the NumpyAllocator. StdMatAllocator is
53+
// fine to use, because it calls `malloc()`, which we catch with
54+
// `__wrap_malloc()` to ensure the data is allocated on the GC heap
5455
Mat::getDefaultAllocator();
5556

5657
return true;

0 commit comments

Comments
 (0)