Skip to content

Commit a5489e3

Browse files
authored
Require static allocation for capsule names (#300)
1 parent 568f81f commit a5489e3

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

spec/design_topics/data_interchange.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,9 @@ be inspected by name.
124124
The consumer must set the PyCapsule name to `"used_dltensor"`, and call the
125125
`deleter` of the `DLPackManagedTensor` when it no longer needs the data.
126126

127+
Note: the capsule names ``"dltensor"`` and `"used_dltensor"` must be statically
128+
allocated.
129+
127130
When the `strides` field in the `DLTensor` struct is `NULL`, it indicates a
128131
row-major compact array. If the array is of size zero, the data pointer in
129132
`DLTensor` should be set to either `NULL` or `0`.

0 commit comments

Comments
 (0)