Allow integer flags of the form 0xbeef.

Allow hexadecimal integer flags in C-like syntax.
Merge branch 'master' into change-api