@@ -33,7 +33,7 @@ namespace OZW {
3333 {
3434 Nan::HandleScope scope;
3535 CheckMinArgs (1 , " nodeid" );
36- uint8 nodeid = info[0 ]-> Uint32Value ();
36+ uint8 nodeid = Nan::To<Number>( info[0 ]). ToLocalChecked ()-> Value ();
3737 uint8 numGroups = 0 ;
3838 OZWManagerAssign (numGroups, GetNumGroups, homeid, nodeid);
3939 info.GetReturnValue ().Set (Nan::New<Integer>(numGroups));
@@ -49,8 +49,8 @@ namespace OZW {
4949 Nan::HandleScope scope;
5050 CheckMinArgs (2 , " nodeid, groupidx" );
5151 uint8* associations;
52- uint8 nodeid = info[0 ]-> Uint32Value ();
53- uint8 groupidx = info[1 ]-> Uint32Value ();
52+ uint8 nodeid = Nan::To<Number>( info[0 ]). ToLocalChecked ()-> Value ();
53+ uint8 groupidx = Nan::To<Number>( info[1 ]). ToLocalChecked ()-> Value ();
5454
5555 uint32 numNodes = 0 ;
5656 OZWManagerAssign (numNodes, GetAssociations,
@@ -60,7 +60,7 @@ namespace OZW {
6060 Local<Array> o_assocs = Nan::New<Array>(numNodes);
6161
6262 for (uint8 nr = 0 ; nr < numNodes; nr++) {
63- o_assocs-> Set ( Nan::New<Integer>(nr) , Nan::New<Integer>(associations[nr]));
63+ Nan::Set (o_assocs, nr , Nan::New<Integer>(associations[nr]));
6464 }
6565 if (numNodes > 0 ) {
6666 // The caller is responsible for freeing the array memory with a call to delete [].
@@ -79,8 +79,8 @@ namespace OZW {
7979 {
8080 Nan::HandleScope scope;
8181 CheckMinArgs (2 , " nodeid, groupidx" );
82- uint8 nodeid = info[0 ]-> Uint32Value ();
83- uint8 groupidx = info[1 ]-> Uint32Value ();
82+ uint8 nodeid = Nan::To<Number>( info[0 ]). ToLocalChecked ()-> Value ();
83+ uint8 groupidx = Nan::To<Number>( info[1 ]). ToLocalChecked ()-> Value ();
8484
8585 uint8 numMaxAssoc = 0 ;
8686 OZWManagerAssign (numMaxAssoc, GetMaxAssociations,
@@ -99,8 +99,8 @@ namespace OZW {
9999 {
100100 Nan::HandleScope scope;
101101 CheckMinArgs (2 , " nodeid, groupidx" );
102- uint8 nodeid = info[0 ]-> Uint32Value ();
103- uint8 groupidx = info[1 ]-> Uint32Value ();
102+ uint8 nodeid = Nan::To<Number>( info[0 ]). ToLocalChecked ()-> Value ();
103+ uint8 groupidx = Nan::To<Number>( info[1 ]). ToLocalChecked ()-> Value ();
104104
105105 ::std::string groupLabel (" " );
106106 OZWManagerAssign (groupLabel, GetGroupLabel,
@@ -122,12 +122,12 @@ namespace OZW {
122122 {
123123 Nan::HandleScope scope;
124124 CheckMinArgs (3 , " nodeid, groupidx, tgtnodeid" );
125- uint8 nodeid = info[0 ]-> Uint32Value ();
126- uint8 groupidx = info[1 ]-> Uint32Value ();
127- uint8 tgtnodeid = info[2 ]-> Uint32Value ();
125+ uint8 nodeid = Nan::To<Number>( info[0 ]). ToLocalChecked ()-> Value ();
126+ uint8 groupidx = Nan::To<Number>( info[1 ]). ToLocalChecked ()-> Value ();
127+ uint8 tgtnodeid = Nan::To<Number>( info[2 ]). ToLocalChecked ()-> Value ();
128128 uint8 instanceid = 0 ;
129129 if (info.Length () > 3 ) {
130- instanceid = info[3 ]-> Uint32Value ();
130+ instanceid = Nan::To<Number>( info[3 ]). ToLocalChecked ()-> Value ();
131131 }
132132
133133 OZWManager ( AddAssociation,
@@ -144,12 +144,12 @@ namespace OZW {
144144 {
145145 Nan::HandleScope scope;
146146 CheckMinArgs (3 , " nodeid, groupidx, tgtnodeid" );
147- uint8 nodeid = info[0 ]-> Uint32Value ();
148- uint8 groupidx = info[1 ]-> Uint32Value ();
149- uint8 tgtnodeid = info[2 ]-> Uint32Value ();
147+ uint8 nodeid = Nan::To<Number>( info[0 ]). ToLocalChecked ()-> Value ();
148+ uint8 groupidx = Nan::To<Number>( info[1 ]). ToLocalChecked ()-> Value ();
149+ uint8 tgtnodeid = Nan::To<Number>( info[2 ]). ToLocalChecked ()-> Value ();
150150 uint8 instanceid = 0 ;
151151 if (info.Length () > 3 ) {
152- instanceid = info[3 ]-> Uint32Value ();
152+ instanceid = Nan::To<Number>( info[3 ]). ToLocalChecked ()-> Value ();
153153 }
154154
155155 OZWManager ( RemoveAssociation,
0 commit comments