note
ikegami
<blockquote><p><i>It ought to be possible to make a single determination at the top of a routine</i></blockquote>
<p>That is how it's done. A single SvGETMAGIC if you read a scalar, no matter how many times you read it. A single SvSETMAGIC if you write to a scalar, no matter how many times you write to it. You don't want to call magic twice, and not just for performance reasons.
928011
928044