File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -465,6 +465,14 @@ \section{Type Objects \label{type-structs}}
465465 has a non-zero \member {tp_itemsize}, it is generally not safe to set
466466 \member {tp_itemsize} to a different non-zero value in a subtype
467467 (though this depends on the implementation of the base type).
468+
469+ A note about alignment: if the variable items require a particular
470+ alignment, this should be taken care of by the value of
471+ \member {tp_basicsize}. Example: suppose a type implements an array
472+ of \code {double}. \member {tp_itemsize} is \code {sizeof(double)}.
473+ It is the programmer's responsibility that \member {tp_basicsize} is
474+ a multiple of \code {sizeof(double)} (assuming this is the alignment
475+ requirement for \code {double}).
468476\end {cmemberdesc }
469477
470478\begin {cmemberdesc }{PyTypeObject}{destructor}{tp_dealloc}
You can’t perform that action at this time.
0 commit comments