@@ -252,7 +252,7 @@ static Napi::Value PtyStartProcess(const Napi::CallbackInfo& info) {
252
252
if (SUCCEEDED (hr)) {
253
253
// We were able to instantiate a conpty
254
254
const int ptyId = InterlockedIncrement (&ptyCounter);
255
- marshal.Set (" pty" , Napi::Number::New (env, ptyId));
255
+ marshal.Set (" pty" , Napi::Number::New (env, ptyId));
256
256
ptyHandles.insert (ptyHandles.end (), new pty_baton (ptyId, hIn, hOut, hpc));
257
257
} else {
258
258
throw Napi::Error::New (env, " Cannot launch conpty" );
@@ -429,22 +429,22 @@ static Napi::Value PtyClear(const Napi::CallbackInfo& info) {
429
429
throw Napi::Error::New (env, " Usage: pty.clear(id)" );
430
430
}
431
431
432
- int id = info[0 ].As <Napi::Number>().Int32Value ();
433
-
434
- const pty_baton* handle = get_pty_baton (id);
435
-
436
- if (handle != nullptr ) {
437
- HANDLE hLibrary = LoadLibraryExW (L" kernel32.dll" , 0 , 0 );
438
- bool fLoadedDll = hLibrary != nullptr ;
439
- if (fLoadedDll )
440
- {
441
- PFNCLEARPSEUDOCONSOLE const pfnClearPseudoConsole = (PFNCLEARPSEUDOCONSOLE)GetProcAddress ((HMODULE)hLibrary, " ClearPseudoConsole" );
442
- if (pfnClearPseudoConsole)
443
- {
444
- pfnClearPseudoConsole (handle->hpc );
445
- }
446
- }
447
- }
432
+ // int id = info[0].As<Napi::Number>().Int32Value();
433
+
434
+ // const pty_baton* handle = get_pty_baton(id);
435
+
436
+ // if (handle != nullptr) {
437
+ // HANDLE hLibrary = LoadLibraryExW(L"kernel32.dll", 0, 0);
438
+ // bool fLoadedDll = hLibrary != nullptr;
439
+ // if (fLoadedDll)
440
+ // {
441
+ // PFNCLEARPSEUDOCONSOLE const pfnClearPseudoConsole = (PFNCLEARPSEUDOCONSOLE)GetProcAddress((HMODULE)hLibrary, "ClearPseudoConsole");
442
+ // if (pfnClearPseudoConsole)
443
+ // {
444
+ // pfnClearPseudoConsole(handle->hpc);
445
+ // }
446
+ // }
447
+ // }
448
448
449
449
return env.Undefined ();
450
450
}
0 commit comments