Branch: Tag:

2014-08-20

2014-08-20 15:33:24 by Henrik Grubbström (Grubba) <grubba@grubba.org>

encode_value: Don't regard the variant dispatcher as a CFUN.

The variant dispatcher is a CFUN that may show up in pure Pike
programs, so don't fallback to the C-program encodings when
the only CFUN is the variant dispatcher.

Potentially fixes dumping problems with Crypto.RSA.State
(where generate_key() is a variant function).

1011:    {    int has_local_c_methods = 0;    for (d = 0; d < p->num_identifiers; d++) { -  if (IDENTIFIER_IS_C_FUNCTION(p->identifiers[d].identifier_flags)) { +  struct identifier *id = p->identifiers + d; +  if (IDENTIFIER_IS_C_FUNCTION(id->identifier_flags) && +  !low_is_variant_dispatcher(id)) {    has_local_c_methods = 1;    break;    }