Re: [Spice-devel] [PATCH spice-gtk v3] Remove unnecessary debug check from SPICE_DEBUG

2017-06-14 Thread Marc-André Lureau
Hi - Original Message - > On Fri, 2017-06-09 at 14:29 -0400, Marc-André Lureau wrote: > > Hi > > > > - Original Message - > > > Hi > > > > > > - Original Message - > > > > > If I was reading the code of a project and noticed that they > > > > > checked a > > > > > global

Re: [Spice-devel] [PATCH spice-gtk v3] Remove unnecessary debug check from SPICE_DEBUG

2017-06-13 Thread Jonathon Jongsma
On Fri, 2017-06-09 at 14:29 -0400, Marc-André Lureau wrote: > Hi > > - Original Message - > > Hi > > > > - Original Message - > > > > If I was reading the code of a project and noticed that they > > > > checked a > > > > global variable every time before calling g_debug(), I would

Re: [Spice-devel] [PATCH spice-gtk v3] Remove unnecessary debug check from SPICE_DEBUG

2017-06-09 Thread Marc-André Lureau
Hi - Original Message - > Hi > > - Original Message - > > > If I was reading the code of a project and noticed that they checked a > > > global variable every time before calling g_debug(), I would find that > > > very odd. For example: > > > > > > void foo(void) > > > { > > >

Re: [Spice-devel] [PATCH spice-gtk v3] Remove unnecessary debug check from SPICE_DEBUG

2017-06-09 Thread Marc-André Lureau
Hi - Original Message - > > If I was reading the code of a project and noticed that they checked a > > global variable every time before calling g_debug(), I would find that > > very odd. For example: > > > > void foo(void) > > { > > if (foo_get_debug()) { > > g_debug("somethin

Re: [Spice-devel] [PATCH spice-gtk v3] Remove unnecessary debug check from SPICE_DEBUG

2017-06-09 Thread Victor Toso
Hi, On Fri, Jun 09, 2017 at 01:00:56PM -0500, Jonathon Jongsma wrote: > On Fri, 2017-06-09 at 12:41 -0400, Marc-André Lureau wrote: > > Hi > > > > - Original Message - > > > Calling spice_util_get_debug() from the SPICE_DEBUG() macro is > > > unnecessary since g_log() will already check w

Re: [Spice-devel] [PATCH spice-gtk v3] Remove unnecessary debug check from SPICE_DEBUG

2017-06-09 Thread Marc-André Lureau
Hi - Original Message - > On Fri, 2017-06-09 at 12:41 -0400, Marc-André Lureau wrote: > > Hi > > > > - Original Message - > > > Calling spice_util_get_debug() from the SPICE_DEBUG() macro is > > > unnecessary since g_log() will already check whether the message > > > will > > > ac

Re: [Spice-devel] [PATCH spice-gtk v3] Remove unnecessary debug check from SPICE_DEBUG

2017-06-09 Thread Jonathon Jongsma
On Fri, 2017-06-09 at 12:41 -0400, Marc-André Lureau wrote: > Hi > > - Original Message - > > Calling spice_util_get_debug() from the SPICE_DEBUG() macro is > > unnecessary since g_log() will already check whether the message > > will > > actually be printed. The only benefit to calling th

Re: [Spice-devel] [PATCH spice-gtk v3] Remove unnecessary debug check from SPICE_DEBUG

2017-06-09 Thread Frediano Ziglio
> > Hi > > - Original Message - > > > > > > Hi > > > > > > - Original Message - > > > > Calling spice_util_get_debug() from the SPICE_DEBUG() macro is > > > > unnecessary since g_log() will already check whether the message will > > > > actually be printed. The only benefit to c

Re: [Spice-devel] [PATCH spice-gtk v3] Remove unnecessary debug check from SPICE_DEBUG

2017-06-09 Thread Marc-André Lureau
Hi - Original Message - > > > > Hi > > > > - Original Message - > > > Calling spice_util_get_debug() from the SPICE_DEBUG() macro is > > > unnecessary since g_log() will already check whether the message will > > > actually be printed. The only benefit to calling this function fr

Re: [Spice-devel] [PATCH spice-gtk v3] Remove unnecessary debug check from SPICE_DEBUG

2017-06-09 Thread Frediano Ziglio
> > Hi > > - Original Message - > > Calling spice_util_get_debug() from the SPICE_DEBUG() macro is > > unnecessary since g_log() will already check whether the message will > > actually be printed. The only benefit to calling this function from > > SPICE_DEBUG() is that it ensures that th

Re: [Spice-devel] [PATCH spice-gtk v3] Remove unnecessary debug check from SPICE_DEBUG

2017-06-09 Thread Marc-André Lureau
Hi - Original Message - > Calling spice_util_get_debug() from the SPICE_DEBUG() macro is > unnecessary since g_log() will already check whether the message will > actually be printed. The only benefit to calling this function from > SPICE_DEBUG() is that it ensures that the SPICE_DEBUG env

[Spice-devel] [PATCH spice-gtk v3] Remove unnecessary debug check from SPICE_DEBUG

2017-06-09 Thread Jonathon Jongsma
Calling spice_util_get_debug() from the SPICE_DEBUG() macro is unnecessary since g_log() will already check whether the message will actually be printed. The only benefit to calling this function from SPICE_DEBUG() is that it ensures that the SPICE_DEBUG environment variable gets read the very firs