Index: include/asterisk/stringfields.h =================================================================== --- include/asterisk/stringfields.h (revision 230993) +++ include/asterisk/stringfields.h (working copy) @@ -102,6 +102,10 @@ #include "asterisk/inline_api.h" +/* the type of storage used to track how many bytes were allocated for a field */ + +typedef uint16_t ast_string_field_allocation; + /*! \internal \brief An opaque type for managed string fields in structures @@ -112,7 +116,7 @@ In addition to the string itself, the amount of space allocated for the field is stored in the two bytes immediately preceding it. */ -typedef const char * ast_string_field; +typedef const char * ast_string_field __attribute__ ((aligned (sizeof(ast_string_field_allocation)))); /*! \internal @@ -293,10 +297,6 @@ void __ast_string_field_release_active(struct ast_string_field_pool *pool_head, const ast_string_field ptr); -/* the type of storage used to track how many bytes were allocated for a field */ - -typedef uint16_t ast_string_field_allocation; - /*! \brief Macro to provide access to the allocation field that lives immediately in front of a string field \param x Pointer to the string field