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: Ben Key
Subject: RE: Need help with Windows implementation of play-sound
Date: Sun, 22 Sep 2002 01:01:04 -0400

Thanks.  I will try the change you suggested Monday.  If it works, I will
attempt to gernerate a patch for Emacs that includes this and the changes to
the make files, and send it to this list. 

-----Original Message-----
From: address@hidden
To: Ben Key
Cc: address@hidden
Sent: 9/21/02 5:34 AM
Subject: Re: Need help with Windows implementation of play-sound


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]