handle numeric types better

This commit is contained in:
Eliot Horowitz
2009-10-27 16:23:07 -04:00
parent d27c8505ea
commit ef6bc68882
4 changed files with 18 additions and 0 deletions

View File

@@ -164,6 +164,14 @@ namespace mongo {
return get( field )->ToNumber()->Value();
}
int V8Scope::getNumberInt( const char *field ){
return get( field )->ToInt32()->Value();
}
long long V8Scope::getNumberLongLong( const char *field ){
return get( field )->ToInteger()->Value();
}
string V8Scope::getString( const char *field ){
return toSTLString( get( field ) );
}