The mi_type_align() function

The mi_type_align() function obtains the alignment for a data type from its type descriptor.

Syntax

mi_integer mi_type_align(type_desc)
   MI_TYPE_DESC *type_desc;
type_desc
A pointer to the type descriptor from which to obtain the alignment of the data type.
Valid in client LIBMI application? Valid in user-defined routine?
Yes Yes

Usage

The mi_type_align() function determines the alignment for the data type that the type_desc type descriptor references. The default type alignment is 4 bytes. For extended data types, the alignment is the value of the align column of the sysxtdtypes system catalog table.

Return values

>=0
The number of bytes for type alignment of the data type in the type_desc type descriptor.
MI_ERROR
The function was not successful.