Skip to content

Commit

Permalink
Merge pull request #125 from Apollon77/node22
Browse files Browse the repository at this point in the history
Node22
  • Loading branch information
Apollon77 authored May 9, 2024
2 parents 17a3b50 + c15d745 commit 8256736
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test-and-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
node-version: [16.x, 18.x, 20.x]
node-version: [16.x, 18.x, 20.x, 22.x]
os: [ubuntu-latest, windows-2019, windows-latest, macos-latest]

steps:
Expand Down
9 changes: 9 additions & 0 deletions binding.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,15 @@
'-w'
],
}

}],
['OS=="win"', {
'defines': [
# Stop <windows.h> from defining macros that conflict with
# std::min() and std::max(). We don't use <windows.h> (much)
# but we still inherit it from uv.h.
'NOMINMAX',
]
}]
],
'dependencies': [
Expand Down
13 changes: 6 additions & 7 deletions src/mbus-master.cc
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,6 @@ class RecieveWorker : public Nan::AsyncWorker {
char error[100];
int address;
int secondary_selected = 0;
int request_frame_res;

memset((void *)&reply, 0, sizeof(mbus_frame));

Expand Down Expand Up @@ -376,7 +375,7 @@ class RecieveWorker : public Nan::AsyncWorker {
Nan::New<String>(data).ToLocalChecked()
};
free(data);
callback->Call(2, argv);
callback->Call(2, argv, async_resource);
};

void HandleErrorCallback () {
Expand All @@ -388,7 +387,7 @@ class RecieveWorker : public Nan::AsyncWorker {
Nan::Error(ErrorMessage())
};

callback->Call(1, argv);
callback->Call(1, argv, async_resource);
}
private:
char *data;
Expand Down Expand Up @@ -586,7 +585,7 @@ class ScanSecondaryWorker : public Nan::AsyncWorker {
Nan::New<String>(data).ToLocalChecked()
};
free(data);
callback->Call(2, argv);
callback->Call(2, argv, async_resource);
};

void HandleErrorCallback () {
Expand All @@ -597,7 +596,7 @@ class ScanSecondaryWorker : public Nan::AsyncWorker {
Local<Value> argv[] = {
Nan::Error(ErrorMessage())
};
callback->Call(1, argv);
callback->Call(1, argv, async_resource);
}
private:
char *data;
Expand Down Expand Up @@ -769,7 +768,7 @@ class SetPrimaryWorker : public Nan::AsyncWorker {
Local<Value> argv[] = {
Nan::Null()
};
callback->Call(1, argv);
callback->Call(1, argv, async_resource);
};

void HandleErrorCallback () {
Expand All @@ -781,7 +780,7 @@ class SetPrimaryWorker : public Nan::AsyncWorker {
Nan::Error(ErrorMessage())
};

callback->Call(1, argv);
callback->Call(1, argv, async_resource);
}
private:
char *old_addr_str;
Expand Down

0 comments on commit 8256736

Please sign in to comment.