emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Need help with Windows implementation of play-sound


From: Harald . Maier . BW
Subject: Re: Need help with Windows implementation of play-sound
Date: Sat, 21 Sep 2002 11:34:43 +0200
User-agent: Gnus/5.090007 (Oort Gnus v0.07) Emacs/21.2.90 (i386-mingw-nt5.0.2195)

Ben Key <address@hidden> writes:

> Can someone take a look at what I have done so far and give me a few 
> pointers?

> {
>   len=XSTRING(attrs[SOUND_FILE])->size;
>   lpszFile=(char *)alloca(len+1);
...
>   free(lpszFile);
!!! remove that line !!!

>   unbind_to (count, Qnil);
>   return Qnil;
> }

You are using alloca so you don't have to call free. free is necessary
by using malloc. The memory allocated by alloca will be automatically
be freed by leaving the funciton.

I am very interested in testing this. 

Harald





reply via email to

[Prev in Thread] Current Thread [Next in Thread]