GNU bug report logs - #451
23.0.60; x-gtk-map-stock destroys match data

Previous Next

Package: emacs;

Reported by: Nick Roberts <nickrob <at> snap.net.nz>

Date: Fri, 20 Jun 2008 03:50:03 UTC

Severity: normal

Done: Stefan Monnier <monnier <at> iro.umontreal.ca>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Nick Roberts <nickrob <at> snap.net.nz>
Cc: 451 <at> debbugs.gnu.org, emacs-pretest-bug <at> gnu.org
Subject: bug#451: 23.0.60; x-gtk-map-stock destroys match data
Date: Fri, 20 Jun 2008 10:28:30 -0400
> In the event loop (?), update_frame_tool_bar calls x-gtk-map-stock (in
> x-win.el) which uses string-match.  This changes the match data that
> I need for my application.  I don't know what the rules are about
> using string-match from C code but as a minimum x-gtk-map-stock should
> wrap save-match-data around the call to it.

The match-data is a very volatile piece of data.  So while you may be
right, I think it's more likely that the problem is in your code
(i.e., your code should save the match-data itself if it needs to use
it after some non-trivial code has been run, and by "trivial" I *really*
mean trivial).


        Stefan








This bug report was last modified 16 years and 338 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.