Refactor newATTRSUB()'s logic for grafting a sub definition to an existing stub
authorNicholas Clark <nick@ccl4.org>
Thu, 18 Nov 2010 14:54:44 +0000 (14:54 +0000)
committerNicholas Clark <nick@ccl4.org>
Thu, 18 Nov 2010 15:00:44 +0000 (15:00 +0000)
commit437388a93114b1acbfb3a173dfa7aa2138fd8283
tree54c89721ce3ee574f9ffdd0e83ee54886d68a00b
parentce057ba89da80863694d58259ca5a4408f7e44c8
Refactor newATTRSUB()'s logic for grafting a sub definition to an existing stub

Previously it was using cv_undef() to (partially) free the target CV (the
pre-existing stub), before donating it the padlist and outside pointers from
the source CV (the definition, just compiled), and then freeing up the remains
of the source CV.

Instead, explicitly exchange padlist and outside pointers, explicitly assign
other fields that need changing (file and stash), and assert that various
CvFLAGS are as we expect them.
op.c