@@ -252,7 +252,7 @@ static Napi::Value PtyStartProcess(const Napi::CallbackInfo& info) {
252252 if (SUCCEEDED (hr)) {
253253 // We were able to instantiate a conpty
254254 const int ptyId = InterlockedIncrement (&ptyCounter);
255- marshal.Set (" pty" , Napi::Number::New (env, ptyId));
255+ marshal.Set (" pty" , Napi::Number::New (env, ptyId));
256256 ptyHandles.insert (ptyHandles.end (), new pty_baton (ptyId, hIn, hOut, hpc));
257257 } else {
258258 throw Napi::Error::New (env, " Cannot launch conpty" );
@@ -429,22 +429,22 @@ static Napi::Value PtyClear(const Napi::CallbackInfo& info) {
429429 throw Napi::Error::New (env, " Usage: pty.clear(id)" );
430430 }
431431
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+ // }
448448
449449 return env.Undefined ();
450450}
0 commit comments