Branch: Tag:

2014-08-20

2014-08-20 16:34:42 by Henrik Grubbström (Grubba) <grubba@grubba.org>

encode_value: Improved support for variant functions.

Variant functions weren't dumped correctly if they were
overloading inherited non-variant functions.

Fixes remaining issue with the dumping of Crypto.RSA.State.

1385:    "is inherited.\n", id->name);    }    gs_flags = ref->id_flags & PTR_FROM_INT(p, i)->id_flags; -  if (id_dumped[PTR_FROM_INT(p, i)->identifier_offset]) { +  if (id_dumped[PTR_FROM_INT(p, i)->identifier_offset] || +  (i < d)) { +  /* Either already dumped, or the dispatcher is in +  * front of us, which indicates that we are overloading +  * an inherited function with a variant. +  */    gs_flags |= ID_VARIANT;    } else {    /* First variant. */