0
0
mirror of https://github.com/mongodb/mongo.git synced 2024-11-30 17:10:48 +01:00

Merge branch 'master' of ssh://git.latenightcoders.com/data/gitroot/p

This commit is contained in:
Dwight 2007-11-12 11:01:55 -05:00
commit 688e853578
3 changed files with 11 additions and 2 deletions

View File

@ -29,6 +29,9 @@ int Element::size() {
case String:
x = valuestrsize() + 4 + 1;
break;
case DBRef:
x = valuestrsize() + 4 + 12 + 1;
break;
case Object:
case Array:
x = objsize() + 1;
@ -52,7 +55,7 @@ int Element::size() {
if( !eoo() ) {
const char *next = data + totalSize;
if( *next < 0 || *next > RegEx ) {
if( *next < 0 || *next > DBRef ) {
// bad type.
cout << "*********************************************\n";
cout << "Bad data or size in Element::size()" << endl;

View File

@ -18,7 +18,8 @@ class JSObjBuilder;
EOO = end of object
*/
enum JSType { EOO = 0, Number=1, String=2, Object=3, Array=4, BinData=5,
Undefined=6, jstOID=7, Bool=8, Date=9 , jstNULL=10, RegEx=11 };
Undefined=6, jstOID=7, Bool=8, Date=9 , jstNULL=10, RegEx=11 ,
DBRef=12 };
/* subtypes of BinData.
bdtCustom and above are ones that the JS compiler understands, but are

View File

@ -33,3 +33,8 @@ cleandb:
/usr/local/lib/libpcrecpp.a:
cat pcre.txt
pcre:
curl -O ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-7.4.tar.gz
tar -xzf pcre-7.4.tar.gz
cd pcre-7.4 && ./configure --enable-utf8 --with-match-limit=200000 --with-match-limit-recursion=4000 && make && make install