Ticket #1005 (closed patch: done)

Opened 5 years ago

Last modified 5 years ago

Use VTABLE_is_equal instead of MMD in Hash and ResizablePMCArray

Reported by: flh Owned by:
Priority: normal Milestone:
Component: core Version: trunk
Severity: medium Keywords:
Cc: Language:
Patch status: applied Platform: all

Description

The "is_equal" methods of Hash and ResizablePMCArray currently use Parrot_mmd_dispatch_from_c_args to compare their elements.

This makes the attached example fail (VTABLE methods are not automatically registered as MULTI).

I've attached two patches (one for Hash, the other one for RPA) which:

  • replace the MMD call with VTABLE_is_equal (this matches what is currently done in FixedPMCArray),
  • add some tests to cover this code.

Attachments

hash_vtable_equal.patch Download (2.2 KB) - added by flh 5 years ago.
rpa_vtable_equal.patch Download (2.0 KB) - added by flh 5 years ago.
hash_eq.pir Download (0.8 KB) - added by flh 5 years ago.
Failing example

Change History

Changed 5 years ago by flh

Changed 5 years ago by flh

Changed 5 years ago by flh

Failing example

Changed 5 years ago by NotFound

Patch for RPA applied with changes in r41253. Instead of modyfying RPA.is_equal I deleted it and allowed the one in FPA to be inherited.

Changed 5 years ago by NotFound

Applied patch for Hash in r41254. Thanks!

Changed 5 years ago by NotFound

  • status changed from new to closed
  • resolution set to done
  • patch changed from new to applied

No complaints in several days, closing ticket.

Note: See TracTickets for help on using tickets.