3ab2acbf4f
This resolves "warning: implicit conversion shortens 64-bit value into a 32-bit value" The problem is String/Array length is a long (so 64 bits on some platforms instead of 32) and the extension use int There are 2 solutions: * use long everywhere (but waste of memory, and hard to do) * cast into ints (but potential lost of data) I did the second, because all these cases are about String/Array lengths, and it is very unlikely to have a String/Array of more than 2 billions elements (that would mean at least 2GB in memory). The last cast might need to be reviewed (htonl((int)time(NULL))) because htonl want a 32-bit int, but time(NULL) will overflow with the year 2038 problem. |
||
---|---|---|
.. | ||
cbson | ||
java |