diff --git a/src/include/winpty.h b/src/include/winpty.h index 562128f..ae68526 100644 --- a/src/include/winpty.h +++ b/src/include/winpty.h @@ -94,15 +94,13 @@ winpty_config_new(UINT64 agentFlags, winpty_error_ptr_t *err /*OPTIONAL*/); /* Free the cfg object after passing it to winpty_open. */ WINPTY_API void winpty_config_free(winpty_config_t *cfg); -WINPTY_API BOOL -winpty_config_set_initial_size(winpty_config_t *cfg, int cols, int rows, - winpty_error_ptr_t *err /*OPTIONAL*/); +WINPTY_API void +winpty_config_set_initial_size(winpty_config_t *cfg, int cols, int rows); /* Amount of time to wait for the agent to startup and to wait for any given * agent RPC request. Must be greater than 0. Can be INFINITE. */ -WINPTY_API BOOL -winpty_config_set_agent_timeout(winpty_config_t *cfg, DWORD timeoutMs, - winpty_error_ptr_t *err /*OPTIONAL*/); +WINPTY_API void +winpty_config_set_agent_timeout(winpty_config_t *cfg, DWORD timeoutMs); diff --git a/src/libwinpty/winpty.cc b/src/libwinpty/winpty.cc index f89ca27..4f4f178 100644 --- a/src/libwinpty/winpty.cc +++ b/src/libwinpty/winpty.cc @@ -165,25 +165,17 @@ WINPTY_API void winpty_config_free(winpty_config_t *cfg) { delete cfg; } -WINPTY_API BOOL -winpty_config_set_initial_size(winpty_config_t *cfg, int cols, int rows, - winpty_error_ptr_t *err /*OPTIONAL*/) { - API_TRY { - ASSERT(cfg != nullptr && cols > 0 && rows > 0); - cfg->cols = cols; - cfg->rows = rows; - return TRUE; - } API_CATCH(FALSE); +WINPTY_API void +winpty_config_set_initial_size(winpty_config_t *cfg, int cols, int rows) { + ASSERT(cfg != nullptr && cols > 0 && rows > 0); + cfg->cols = cols; + cfg->rows = rows; } -WINPTY_API BOOL -winpty_config_set_agent_timeout(winpty_config_t *cfg, DWORD timeoutMs, - winpty_error_ptr_t *err /*OPTIONAL*/) { - API_TRY { - ASSERT(cfg != nullptr && timeoutMs > 0); - cfg->timeoutMs = timeoutMs; - return TRUE; - } API_CATCH(FALSE) +WINPTY_API void +winpty_config_set_agent_timeout(winpty_config_t *cfg, DWORD timeoutMs) { + ASSERT(cfg != nullptr && timeoutMs > 0); + cfg->timeoutMs = timeoutMs; } diff --git a/src/unix-adapter/main.cc b/src/unix-adapter/main.cc index e7cf4f6..b90da65 100644 --- a/src/unix-adapter/main.cc +++ b/src/unix-adapter/main.cc @@ -438,7 +438,7 @@ int main(int argc, char *argv[]) winpty_config_t *agentCfg = winpty_config_new(0, NULL); assert(agentCfg != NULL); - winpty_config_set_initial_size(agentCfg, sz.ws_col, sz.ws_row, NULL); + winpty_config_set_initial_size(agentCfg, sz.ws_col, sz.ws_row); winpty_error_ptr_t openErr = NULL; winpty_t *wp = winpty_open(agentCfg, &openErr);