Remove C99ism.

This commit is contained in:
Martin v. Löwis 2006-02-15 19:56:18 +00:00
parent 2ae3c91db2
commit a87c445177
1 changed files with 2 additions and 1 deletions

View File

@ -186,9 +186,10 @@ parsetok(struct tok_state *tok, grammar *g, int start, perrdetail *err_ret,
err_ret->error = E_EOF;
err_ret->lineno = tok->lineno;
if (tok->buf != NULL) {
size_t len;
assert(tok->cur - tok->buf < INT_MAX);
err_ret->offset = (int)(tok->cur - tok->buf);
size_t len = tok->inp - tok->buf;
len = tok->inp - tok->buf;
err_ret->text = (char *) PyObject_MALLOC(len + 1);
if (err_ret->text != NULL) {
if (len > 0)