XS Constants peculiarity
chris_jack at msn.com
Thu Oct 28 12:32:35 BST 2010
Dirk Koopman wrote:
> Why would RK + LOCK give a different result to RK | LOCK?
Don't know. I don't have your module but if I create FF.pm as:
use constant LOCK => 0x100000;
use constant RK => 0x4;
perl -e 'use FF; printf "0x%x\n", $_ for (LOCK, RK, RK | LOCK, RK + LOCK)'
And use perl 5.8.6, it gives
Would suggest your try:
perl -e 'use FF; printf "0x%x\n", $_ for (RK + LOCK, LOCK + RK, (RK) + (LOCK))'
and see what happens - or use intermediate variables: e.g.
$RK_var = RK;
$LOCK_var = LOCK;
$RK_var + $LOCK_var;
More information about the london.pm