[glib-networking/mcatanzaro/base-rebase: 33/40] base: remove a couple hot calls to gettext()



commit a434a317e3aed626978206d83d13aebd8efef658
Author: Michael Catanzaro <mcatanzaro igalia com>
Date:   Sun Apr 7 16:40:04 2019 -0500

    base: remove a couple hot calls to gettext()
    
    Port of 1f6717ed8e8d8cf71e91812ac3f3f3a782bf16ef

 tls/base/gtlsconnection-base.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/tls/base/gtlsconnection-base.c b/tls/base/gtlsconnection-base.c
index 4f447be..e57ea2a 100644
--- a/tls/base/gtlsconnection-base.c
+++ b/tls/base/gtlsconnection-base.c
@@ -513,8 +513,9 @@ claim_op (GTlsConnectionBase    *tls,
 
       if (timeout == 0)
         {
-          g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_WOULD_BLOCK,
-                               _("Operation would block"));
+          /* Intentionally not translated because this is not a fatal error to be
+           * presented to the user, and to avoid this showing up in profiling. */
+          g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_WOULD_BLOCK, "Operation would block");
           return FALSE;
         }
 
@@ -1462,8 +1463,9 @@ do_implicit_handshake (GTlsConnectionBase  *tls,
       g_task_run_in_thread (priv->implicit_handshake,
                             handshake_thread);
 
-      g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_WOULD_BLOCK,
-                           _("Operation would block"));
+      /* Intentionally not translated because this is not a fatal error to be
+       * presented to the user, and to avoid this showing up in profiling. */
+      g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_WOULD_BLOCK, "Operation would block");
       return FALSE;
     }
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]