mongo-ruby-driver/ext/cbson
eregon 3ab2acbf4f Get rid of "implicit conversion 64-bit 32-bit" warnings
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.
2011-01-03 14:20:58 -05:00
..
buffer.c minor: docs 2010-03-01 12:09:21 -05:00
buffer.h minor: docs 2010-03-01 12:09:21 -05:00
cbson.c Get rid of "implicit conversion 64-bit 32-bit" warnings 2011-01-03 14:20:58 -05:00
encoding_helpers.c minor: docs 2010-03-01 12:09:21 -05:00
encoding_helpers.h minor: docs 2010-03-01 12:09:21 -05:00
extconf.rb renamed mongo_bson to bson 2010-04-05 10:39:55 -04:00
version.h 1.2.rc0 BUMP for development 2010-12-29 12:09:43 -05:00