Fixing again the same bug on pickling/unpickling
This commit is contained in:
parent
6bb5186c8f
commit
e1a0cc90c9
2 changed files with 1 additions and 14 deletions
|
@ -393,6 +393,7 @@ args buffer : %s",
|
|||
toks.tokens[i].op = &(rpn_ops[toks.tokens[i].op_n]);
|
||||
}
|
||||
|
||||
expr_self->rpn->toks = toks;
|
||||
|
||||
if(rpn_expr_untokenize(expr_self->rpn, &toks, 0) < 0)
|
||||
{
|
||||
|
|
14
rpn_jit.c
14
rpn_jit.c
|
@ -162,20 +162,6 @@ int rpn_expr_untokenize(rpn_expr_t *expr, rpn_tokenized_t *tokens, char long_op)
|
|||
return -1;
|
||||
}
|
||||
|
||||
expr->toks.tokens = malloc(sizeof(rpn_token_t)*tokens->tokens_sz);
|
||||
if(!expr->toks.tokens)
|
||||
{
|
||||
snprintf(expr->err_reason, 128,
|
||||
"Unable to allocate memory for tokens : %s",
|
||||
strerror(errno));
|
||||
expr->state = RPN_ERROR;
|
||||
return -1;
|
||||
}
|
||||
memcpy(expr->toks.tokens, tokens->tokens,
|
||||
sizeof(rpn_token_t)*tokens->tokens_sz);
|
||||
expr->toks.tokens_sz = tokens->tokens_sz;
|
||||
expr->toks.argc = tokens->argc;
|
||||
|
||||
expr->state = RPN_READY;
|
||||
return 0;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue