diff options
Diffstat (limited to 'db/jsobj.h')
-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; |