From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Ben Key Newsgroups: gmane.emacs.devel Subject: RE: Need help with Windows implementation of play-sound Date: Sun, 22 Sep 2002 01:01:04 -0400 Sender: emacs-devel-admin@gnu.org Message-ID: <762A7BB74D6AD51195EF00B0D0AA16602C37E6@STPETE> NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: main.gmane.org 1032671717 25203 127.0.0.1 (22 Sep 2002 05:15:17 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 22 Sep 2002 05:15:17 +0000 (UTC) Cc: "'emacs-devel@gnu.org'" Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 17sz5Q-0006YN-00 for ; Sun, 22 Sep 2002 07:15:16 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 17szl4-0004b1-00 for ; Sun, 22 Sep 2002 07:58:18 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10) id 17sz5P-00074Z-00; Sun, 22 Sep 2002 01:15:15 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10) id 17sz3o-00072b-00 for emacs-devel@gnu.org; Sun, 22 Sep 2002 01:13:36 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10) id 17sz3m-000726-00 for emacs-devel@gnu.org; Sun, 22 Sep 2002 01:13:36 -0400 Original-Received: from stpete.freedomscientific.com ([209.101.206.132] helo=stpete.FreedomScientific) by monty-python.gnu.org with esmtp (Exim 4.10) id 17sz3m-000722-00 for emacs-devel@gnu.org; Sun, 22 Sep 2002 01:13:34 -0400 Original-Received: by STPETE with Internet Mail Service (5.5.2656.59) id ; Sun, 22 Sep 2002 01:01:08 -0400 Original-To: "'Harald.Maier.BW@t-online.de '" X-Mailer: Internet Mail Service (5.5.2656.59) Errors-To: emacs-devel-admin@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.devel:8091 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:8091 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: Harald.Maier.BW@t-online.de To: Ben Key Cc: emacs-devel@gnu.org Sent: 9/21/02 5:34 AM Subject: Re: Need help with Windows implementation of play-sound Ben Key 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