GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Patch LockMasterSetStatus · nodegit/nodegit@7f4fd05

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • generate/templates/templates
    • nodegit.cc
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎generate/templates/templates/nodegit.cc‎

Copy file name to clipboardExpand all lines: generate/templates/templates/nodegit.cc
+5-3Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,10 @@ void LockMasterSetStatus(const FunctionCallbackInfo<Value>& info) {
6969
Nan::HandleScope scope;
7070

7171
// convert the first argument to Status
72-
if(info.Length() >= 0 && info[0]->IsNumber()) {
73-
v8::Local<v8::Int32> value = info[0]->ToInt32();
74-
LockMaster::Status status = static_cast<LockMaster::Status>(value->Value());
72+
if(info.Length() >= 0 && info[0]->IsUint32()) {
73+
uint value = info[0]->Uint32Value();
74+
75+
LockMaster::Status status = static_cast<LockMaster::Status>(value);
7576
if(status >= LockMaster::Disabled && status <= LockMaster::Enabled) {
7677
LockMaster::SetStatus(status);
7778
return;
@@ -82,6 +83,7 @@ void LockMasterSetStatus(const FunctionCallbackInfo<Value>& info) {
8283
Nan::ThrowError("Argument must be one 0, 1 or 2");
8384
}
8485

86+
8587
void LockMasterGetStatus(const FunctionCallbackInfo<Value>& info) {
8688
info.GetReturnValue().Set(Nan::New(LockMaster::GetStatus()));
8789
}

0 commit comments

Comments
0 (0)
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.