Skip to content
This repository has been archived by the owner on Sep 19, 2018. It is now read-only.

Commit

Permalink
support marshalling CHOICE elements
Browse files Browse the repository at this point in the history
This change supports marshalling `blpapi::Element` that are of type
`blpapi::DataType::CHOICE` to the appropriate `v8::Value` type.
  • Loading branch information
ericvw committed May 30, 2015
1 parent 3b62bad commit 7495412
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions blpapijs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1102,8 +1102,9 @@ mkutctime(struct tm* tm)
}

Handle<Value>
Session::elementValueToValue(Isolate *isolate,
const blpapi::Element& e, int idx)
Session::elementValueToValue(Isolate *isolate,
const blpapi::Element& e,
int idx)
{
if (e.isNull())
return Null(isolate);
Expand Down Expand Up @@ -1213,6 +1214,7 @@ Session::elementValueToValue(Isolate *isolate,
return Date::New(isolate, ms);
}
case blpapi::DataType::SEQUENCE:
case blpapi::DataType::CHOICE:
return elementToValue(isolate, e.getValueAsElement(idx));
default:
break;
Expand Down

0 comments on commit 7495412

Please sign in to comment.