Skip to content

Commit

Permalink
get actual param size when input param is zero
Browse files Browse the repository at this point in the history
  • Loading branch information
dy2012 committed Jun 5, 2017
1 parent 5c0c467 commit ad9263e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions co_closure.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ struct stCoClosure_t
//-- 1.1 comac_argc

#define comac_get_args_cnt( ... ) comac_arg_n( __VA_ARGS__ )
#define comac_arg_n( _1,_2,_3,_4,_5,_6,_7,N,...) N
#define comac_arg_n( _0,_1,_2,_3,_4,_5,_6,_7,N,...) N
#define comac_args_seqs() 7,6,5,4,3,2,1,0
#define comac_join_1( x,y ) x##y

#define comac_argc( ... ) comac_get_args_cnt( __VA_ARGS__,comac_args_seqs() )
#define comac_argc( ... ) comac_get_args_cnt( 0,##__VA_ARGS__,comac_args_seqs() )
#define comac_join( x,y) comac_join_1( x,y )

//-- 1.2 repeat
Expand Down

0 comments on commit ad9263e

Please sign in to comment.