diff options
author | unknown <Administrator@.(none)> | 2008-10-11 16:32:33 -0500 |
---|---|---|
committer | unknown <Administrator@.(none)> | 2008-10-11 16:32:33 -0500 |
commit | edb03141fb9255cc44a11d51fbafe619166bd26f (patch) | |
tree | 472438bebdf7b6777e2fe24655084816011eb722 | |
parent | b696111e643227a49260caaff107e6c727c356a6 (diff) | |
download | mongo-edb03141fb9255cc44a11d51fbafe619166bd26f.tar.gz |
allow high bit of type to spoecify something
-rw-r--r-- | db/jsobj.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/db/jsobj.h b/db/jsobj.h index 7a79906d815..c2dc33ce37a 100644 --- a/db/jsobj.h +++ b/db/jsobj.h @@ -36,7 +36,9 @@ class JSObjBuilder; */ 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 , - DBRef=12, Code=13, Symbol=14, CodeWScope=15 , JSTypeMax=15, MaxKey=127 }; + DBRef=12, Code=13, Symbol=14, CodeWScope=15 , JSTypeMax=15, MaxKey=127, + IntegerNumber = 0x80 +}; /* subtypes of BinData. bdtCustom and above are ones that the JS compiler understands, but are @@ -91,7 +93,7 @@ class Element { friend class JSObj; public: string toString(); - JSType type() const { return (JSType) *data; } + JSType type() const { return (JSType) (((int)*data)&0x7f); } bool eoo() const { return type() == EOO; } int size() const; |