Skip to content

Commit

Permalink
add comment for __tb_typeref__
Browse files Browse the repository at this point in the history
  • Loading branch information
waruqi committed Aug 23, 2016
1 parent e20b121 commit 9718010
Showing 1 changed file with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion src/tbox/prefix/keyword.h
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,28 @@
# define __tb_no_sanitize_address__
#endif

// the object reference type, .e.g tb_xxx_ref_t
/*! the type reference keyword for defining tb_xxxx_ref_t
*
* typedef __tb_typeref__(xxxx);
*
*
* suppress gcc 4.9 on c++ codes warning: '__tb_yyyy_t' has a field '__tb_yyyy_t::xxxx' whose type uses the anonymous namespace
*
* @code
*
typedef struct{}* tb_xxxx_ref_t;
typedef struct __tb_yyyy_t
{
tb_xxxx_ref_t xxxx;
}__tb_yyyy_t;
*
*
* @endcode
*
*/
#define __tb_typeref__(object) struct __tb_##object##_dummy_t{tb_int_t dummy;}* tb_##object##_ref_t

// macros
Expand Down

0 comments on commit 9718010

Please sign in to comment.