all emit methods now return number of bytes that were emitted.


use "?w=1" to see the diff since there are a lot of changes that are just white spaces.
This change and the other changes to return an int rather than void are non-backwards compatible interface changes.  You should either preserve the original void methods and change the name of the new ones that return int, or bump the major version number along with this change.