XS Constants peculiarity

Dirk Koopman djk at tobit.co.uk
Thu Oct 28 11:03:14 BST 2010


A few years ago I put together an XS interface to an internal program 
writing system that a company I work for occasionally uses.

The constants are standard ones that XS generates (i.e. integers) and

  perl -e 'use FF;  printf "0x%x\n", $_ for (LOCK, RK, RK | LOCK, RK + 
LOCK)'

yields:

0x100000
0x4
0x100004
0x4

Why would RK + LOCK give a different result to RK | LOCK?

The perl they use is fairly old at 5.8.7 but that can't easily be 
changed for all the usual corporate excuses.


More information about the london.pm mailing list