mirror of
https://github.com/pybind/pybind11.git
synced 2024-11-22 05:05:11 +00:00
docs: Missing semicolons (#4094)
Add semicolons to Memory view sample code
This commit is contained in:
parent
b07975f492
commit
d70f54b073
@ -433,7 +433,7 @@ following:
|
|||||||
{ 2, 4 }, // shape (rows, cols)
|
{ 2, 4 }, // shape (rows, cols)
|
||||||
{ sizeof(uint8_t) * 4, sizeof(uint8_t) } // strides in bytes
|
{ sizeof(uint8_t) * 4, sizeof(uint8_t) } // strides in bytes
|
||||||
);
|
);
|
||||||
})
|
});
|
||||||
|
|
||||||
This approach is meant for providing a ``memoryview`` for a C/C++ buffer not
|
This approach is meant for providing a ``memoryview`` for a C/C++ buffer not
|
||||||
managed by Python. The user is responsible for managing the lifetime of the
|
managed by Python. The user is responsible for managing the lifetime of the
|
||||||
@ -449,7 +449,7 @@ We can also use ``memoryview::from_memory`` for a simple 1D contiguous buffer:
|
|||||||
buffer, // buffer pointer
|
buffer, // buffer pointer
|
||||||
sizeof(uint8_t) * 8 // buffer size
|
sizeof(uint8_t) * 8 // buffer size
|
||||||
);
|
);
|
||||||
})
|
});
|
||||||
|
|
||||||
.. versionchanged:: 2.6
|
.. versionchanged:: 2.6
|
||||||
``memoryview::from_memory`` added.
|
``memoryview::from_memory`` added.
|
||||||
|
Loading…
Reference in New Issue
Block a user