ruleset: fix registration of opcode sets
authorWim Taymans <wim.taymans@collabora.co.uk>
Sun, 13 Sep 2009 09:49:32 +0000 (11:49 +0200)
committerDavid Schleef <ds@schleef.org>
Sun, 20 Sep 2009 04:46:25 +0000 (21:46 -0700)
commit2652cef663ae302ac640575c830d7aa0d5440794
tree4378a36ed16c14690c528d2830a45e9477d4b9a0
parentea39505d01bc410b7832cb386730b86917669682
ruleset: fix registration of opcode sets

When we register a RuleSet for an OpcodeSet, don't keep a pointer from the
RuleSet to the OpcodeSet because the OpcodeSet pointer can change (due to
realloc) when we register new OpcodeSets.

Instead, keep the opcode_major and use this to get the right index in the
OpcodeSet.
orc/orcopcodes.c
orc/orcprogram.h
orc/orcrule.c