[pypy-commit] cffi cffi-1.0: move the assert next to the line it is protecting
arigo
noreply at buildbot.pypy.org
Fri Apr 10 19:19:53 CEST 2015
Author: Armin Rigo <arigo at tunes.org>
Branch: cffi-1.0
Changeset: r1691:8236b06c316b
Date: 2015-04-10 19:20 +0200
http://bitbucket.org/cffi/cffi/changeset/8236b06c316b/
Log: move the assert next to the line it is protecting
diff --git a/new/parse_c_type.c b/new/parse_c_type.c
--- a/new/parse_c_type.c
+++ b/new/parse_c_type.c
@@ -286,7 +286,6 @@
}
int arg = parse_complete(tok);
_cffi_opcode_t oarg;
- assert(arg_next - base_index <= arg_total);
switch (_CFFI_GETOP(tok->output[arg])) {
case _CFFI_OP_ARRAY:
case _CFFI_OP_OPEN_ARRAY:
@@ -299,6 +298,7 @@
oarg = _CFFI_OP(_CFFI_OP_NOOP, arg);
break;
}
+ assert(arg_next - base_index <= arg_total);
tok->output[arg_next++] = oarg;
if (tok->kind != TOK_COMMA)
break;
More information about the pypy-commit
mailing list