I was talking to Maciej about int vs. long. We decided that 32-bit integers should consistently use "int" rather than "long" in our code and our APIs. That includes things called "long" in IDL files because "long" in IDL means 32-bit.
Created attachment 3485 [details] change a lot of longs to ints, remove some unneeded long-specific code
r=me. I'm committing this with a few minor changes since the tree has changed a bit since this patch.