From: Lukas Mai Date: Fri, 22 Jun 2012 12:34:01 +0000 (+0200) Subject: use STMT_START/_END instead of do/while(0) X-Git-Tag: v0.06_01~25 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=d970c3e7003f58f09fdfc344bb95d21efeeaaeb4;p=p5sagit%2FFunction-Parameters.git use STMT_START/_END instead of do/while(0) --- diff --git a/Parameters.xs b/Parameters.xs index b822303..87b1e38 100644 --- a/Parameters.xs +++ b/Parameters.xs @@ -112,7 +112,7 @@ static int kw_flags(pTHX_ const char *kw_ptr, STRLEN kw_len, Spec *spec) { memcmp(kw_ptr, p, kw_len) == 0 ) { -#define FETCH_HINTK_INTO(NAME, PTR, LEN, X) do { \ +#define FETCH_HINTK_INTO(NAME, PTR, LEN, X) STMT_START { \ const char *fk_ptr_; \ STRLEN fk_len_; \ SV *fk_sv_; \ @@ -122,7 +122,7 @@ static int kw_flags(pTHX_ const char *kw_ptr, STRLEN kw_len, Spec *spec) { if (!((X) = hv_fetch(hints, fk_ptr_, fk_len_, 0))) { \ croak("%s: internal error: $^H{'%.*s'} not set", MY_PKG, (int)fk_len_, fk_ptr_); \ } \ -} while (0) +} STMT_END FETCH_HINTK_INTO(NAME_, kw_ptr, kw_len, psv); spec->name = SvIV(*psv);