Branch: Tag:

2014-01-18

2014-01-18 23:42:35 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Standards.ASN1.Types.MetaExplicit: Improved compatibility.

The objects generated via MetaExplicit now behave more like
the Compound objects they emulate.

Also fixes the argument order in Object()->get_combined_tag(),
which had the arguments swapped.

Fixes ASN.1 tests in the Standards testsuite.

72:    //! @returns    //! the combined tag header    int get_combined_tag() { -  return make_combined_tag(get_tag(), get_cls()); +  return make_combined_tag(get_cls(), get_tag());    }       string(0..255) der;
1282:       Object contents;    +  array(Object) `elements() { return contents ? ({ contents }) : ({}); } +  void `elements=(array(Object) args) +  { +  if (sizeof(args) > 1) error("Invalid number of elements.\n"); +  contents = sizeof(args) && args[0]; +  } +  +  int `combined_tag() { +  return get_combined_tag(); +  } +     this_program init(Object o) {    contents = o;    return this;