Actually come to think of it it's probably just overflowing silently, which since it's a bitmask would be safe. The problem is that cffi recognizes the number will overflow and refuses to allow it to be passed.