From: Justin Seyster Date: Tue, 24 Aug 2010 21:47:51 +0000 (-0400) Subject: Documentation for integer types. X-Git-Tag: release-v1.0~61 X-Git-Url: https://git.fsl.cs.stonybrook.edu/?a=commitdiff_plain;h=d1cb34aa55ab68ace5b28c50becca8b47a1dceb2;p=interaspect.git Documentation for integer types. --- diff --git a/src/aop-type.c b/src/aop-type.c index 38d095d..5e632b5 100644 --- a/src/aop-type.c +++ b/src/aop-type.c @@ -145,12 +145,18 @@ static struct aop_type _aop_t_unsigned128 = { .size = 16, }; +/** + * \defgroup type InterAspect Types + * \{ + */ + /** * Return a type that will match any standard-sized signed integer * type. * * Standard integer sizes are 1, 2, 4, and 8 bytes. This type will - * not match 16-byte or larger integer types. + * not match 16-byte or larger integer types (you must use + * aop_t_signed128() for 16-byte signed integers). * * When passing an aop_t_all_signed() value to an advice function (via * aop_insert_advice()) the value is automatically cast to the @@ -175,7 +181,8 @@ aop_t_all_signed () * type. * * Standard integer sizes are 1, 2, 4, and 8 bytes. This type will - * not match 16-byte or larger integer types. + * not match 16-byte or larger integer types (you must use + * aop_t_unsigned128() for 16-byte unsigned integers). * * When passing an aop_t_all_unsigned() value to an advice function * (via aop_insert_advice()) the value is automatically cast to the @@ -207,66 +214,121 @@ aop_t_all_pointer () return &_aop_t_all_pointer; } +/** + * Return a type that will match any 8-bit signed integer (such as + * char or int8_t). + * \return A type that will match 8-bit signed integers. + */ const struct aop_type * aop_t_signed8 () { return &_aop_t_signed8; } +/** + * Return a type that will match any 16-bit signed integer (int16_t + * or, on most platforms, short). + * \return A type that will match 16-bit signed integers. + */ const struct aop_type * aop_t_signed16 () { return &_aop_t_signed16; } +/** + * Return a type that will match any 32-bit signed integer (int32_t + * or, on most platforms, int). + * \return A type that will match 32-bit signed integers. + */ const struct aop_type * aop_t_signed32 () { return &_aop_t_signed32; } +/** + * Return a type that will match any 64-bit signed integer (int64_t + * or, on most platforms, long long int). + * \return A type that will match 64-bit signed integers. + */ const struct aop_type * aop_t_signed64 () { return &_aop_t_signed64; } +/** + * Return a type that will match any 128-bit signed integer + * (__int128_t on platforms that support 128-bit integers). + * \return A type that will match 128-bit signed integers. + */ const struct aop_type * aop_t_signed128 () { return &_aop_t_signed128; } +/** + * Return a type that will match any 8-bit unsigned integer (such as + * unsigned char or uint8_t). + * \return A type that will match 8-bit unsigned integers. + */ const struct aop_type * aop_t_unsigned8 () { return &_aop_t_unsigned8; } +/** + * Return a type that will match any 16-bit unsigned integer (uint16_t + * or, on most platforms, unsigned short). + * \return A type that will match 16-bit unsigned integers. + */ const struct aop_type * aop_t_unsigned16 () { return &_aop_t_unsigned16; } +/** + * Return a type that will match any 32-bit unsigned integer (uint32_t + * or, on most platforms, unsigned int). + * \return A type that will match 32-bit unsigned integers. + */ const struct aop_type * aop_t_unsigned32 () { return &_aop_t_unsigned32; } +/** + * Return a type that will match any 64-bit unsigned integer (uint64_t + * or, on most platforms, long long unsigned). + * \return A type that will match 64-bit unsigned integers. + */ const struct aop_type * aop_t_unsigned64 () { return &_aop_t_unsigned64; } +/** + * Return a type that will match any 128-bit unsigned integer + * (__uint128_t on platforms that support 128-bit integers). + * \return A type that will match 128-bit unsigned integers. + */ const struct aop_type * aop_t_unsigned128 () { return &_aop_t_unsigned128; } +/* Close Doxygen defgroup block. */ +/** + * \} + */ + /* Returns true if specified type is an "all signed" or "all unsigned" type. */ bool