unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@IRO.UMontreal.CA>
To: Dima Kogan <dima@secretsauce.net>
Cc: 18861@debbugs.gnu.org
Subject: bug#18861: Acknowledgement (25.0.50; gfile-based file notifications are not immediate)
Date: Thu, 30 Oct 2014 12:12:40 -0400	[thread overview]
Message-ID: <jwvtx2la6fl.fsf-monnier+emacsbugs@gnu.org> (raw)
In-Reply-To: <87vbn3eup2.fsf@secretsauce.net> (Dima Kogan's message of "Tue, 28 Oct 2014 14:30:17 -0700")

> Hi.  A glib maintainer responded to the bug report, and it turns out
> emacs was using glib slightly incorrectly.  I'm attaching a patch to fix
> the issue, as suggested by the maintainer.

Thanks.  This is not my area of expertise at all, but since it seems
that noone else has replied yet, I'll try to move it along.

> +  if( g_main_context_acquire(context) != TRUE )
> +    {
> +      // we couldn't acquire the context. I let this function proceed because it
> +      // handles more than just glib file descriptors
> +      retval = -1;
> +    }
> +  else
> +    context_acquired = true;

[ Please follow our coding conventions: put a space before open parens
  (and not after, nor before close parens); use /*...*/ for comments;
  capitalize and punctuate comments; use two spaces between sentences.
  Also, I think "!g_main_context_acquire (context)" would be cleaner than
  "g_main_context_acquire (context) != TRUE".  I find comparing to NULL,
  true, or false generally ugly, tho maybe that's just a personal taste
  of mine that others don't share.  ]

Why set retval to -1?  It seems safer to leave it unchanged (ie. set to 0).


        Stefan





  reply	other threads:[~2014-10-30 16:12 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-28  0:29 bug#18861: 25.0.50; gfile-based file notifications are not immediate Dima Kogan
     [not found] ` <handler.18861.B.14144561857404.ack@debbugs.gnu.org>
2014-10-28  4:22   ` bug#18861: Acknowledgement (25.0.50; gfile-based file notifications are not immediate) Dima Kogan
2014-10-28 21:30     ` Dima Kogan
2014-10-30 16:12       ` Stefan Monnier [this message]
2014-11-05 19:19         ` Dima Kogan
2014-11-06  3:02           ` Stefan Monnier
2014-11-06  8:37             ` Michael Albinus
2014-11-06 18:26             ` Dima Kogan
2014-11-06 23:35               ` Stefan Monnier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwvtx2la6fl.fsf-monnier+emacsbugs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=18861@debbugs.gnu.org \
    --cc=dima@secretsauce.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).