Mercurial > hg > xemacs-beta
diff src/sound.c @ 44:8d2a9b52c682 r19-15prefinal
Import from CVS: tag r19-15prefinal
author | cvs |
---|---|
date | Mon, 13 Aug 2007 08:55:10 +0200 |
parents | 859a2309aef8 |
children | 131b0175ea99 |
line wrap: on
line diff
--- a/src/sound.c Mon Aug 13 08:54:52 2007 +0200 +++ b/src/sound.c Mon Aug 13 08:55:10 2007 +0200 @@ -75,11 +75,13 @@ */ (file, volume, device)) { - /* This function can GC */ + /* This function can call lisp */ int vol; #if defined (HAVE_NATIVE_SOUND) || defined (HAVE_NAS_SOUND) struct device *d = decode_device (device); #endif + struct gcpro gcpro1; + CHECK_STRING (file); if (NILP (volume)) vol = bell_volume; @@ -89,12 +91,14 @@ vol = XINT (volume); } + GCPRO1 (file); file = Fexpand_file_name (file, Qnil); if (NILP (Ffile_readable_p (file))) if (NILP (Ffile_exists_p (file))) error ("file does not exist."); else error ("file is unreadable."); + UNGCPRO; #ifdef HAVE_NAS_SOUND if (DEVICE_CONNECTED_TO_NAS_P (d))