Optimize the services implementation

Dont construct the selection string when we are merely checking if a
selection exists.
This commit is contained in:
Kovid Goyal
2023-02-01 12:44:49 +05:30
parent 1c6bae636b
commit 682428fb54
10 changed files with 55 additions and 9 deletions

3
kitty/glfw-wrapper.c generated
View File

@@ -41,6 +41,9 @@ load_glfw(const char* path) {
*(void **) (&glfwSetCurrentSelectionCallback_impl) = dlsym(handle, "glfwSetCurrentSelectionCallback");
if (glfwSetCurrentSelectionCallback_impl == NULL) fail("Failed to load glfw function glfwSetCurrentSelectionCallback with error: %s", dlerror());
*(void **) (&glfwSetHasCurrentSelectionCallback_impl) = dlsym(handle, "glfwSetHasCurrentSelectionCallback");
if (glfwSetHasCurrentSelectionCallback_impl == NULL) fail("Failed to load glfw function glfwSetHasCurrentSelectionCallback with error: %s", dlerror());
*(void **) (&glfwTerminate_impl) = dlsym(handle, "glfwTerminate");
if (glfwTerminate_impl == NULL) fail("Failed to load glfw function glfwTerminate with error: %s", dlerror());