Mercurial > hg > xemacs-beta
diff src/sound.c @ 116:9f59509498e1 r20-1b10
Import from CVS: tag r20-1b10
author | cvs |
---|---|
date | Mon, 13 Aug 2007 09:23:06 +0200 |
parents | 131b0175ea99 |
children | cca96a509cfe |
line wrap: on
line diff
--- a/src/sound.c Mon Aug 13 09:21:56 2007 +0200 +++ b/src/sound.c Mon Aug 13 09:23:06 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))