From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Harald.Maier.BW@t-online.de Newsgroups: gmane.emacs.devel Subject: Re: Need help with Windows implementation of play-sound Date: Sat, 21 Sep 2002 11:34:43 +0200 Sender: emacs-devel-admin@gnu.org Message-ID: References: <762A7BB74D6AD51195EF00B0D0AA16602C37E3@STPETE> Reply-To: Harald Maier NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1032608331 20827 127.0.0.1 (21 Sep 2002 11:38:51 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sat, 21 Sep 2002 11:38:51 +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 17sib2-0005Pl-00 for ; Sat, 21 Sep 2002 13:38:48 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 17sjGi-00033o-00 for ; Sat, 21 Sep 2002 14:21:56 +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 17sib0-00007e-00; Sat, 21 Sep 2002 07:38:46 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10) id 17sgf9-0007Tk-00 for emacs-devel@gnu.org; Sat, 21 Sep 2002 05:34:55 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10) id 17sgf7-0007TY-00 for emacs-devel@gnu.org; Sat, 21 Sep 2002 05:34:54 -0400 Original-Received: from mailout08.sul.t-online.com ([194.25.134.20]) by monty-python.gnu.org with esmtp (Exim 4.10) id 17sgf6-0007TU-00 for emacs-devel@gnu.org; Sat, 21 Sep 2002 05:34:52 -0400 Original-Received: from fwd07.sul.t-online.de by mailout08.sul.t-online.com with smtp id 17sgf4-0003LJ-05; Sat, 21 Sep 2002 11:34:50 +0200 Original-Received: from HESTIA (320041125923-0001@[80.136.242.232]) by fwd07.sul.t-online.com with esmtp id 17sgey-1k9ieeC; Sat, 21 Sep 2002 11:34:44 +0200 Original-To: Ben Key In-Reply-To: <762A7BB74D6AD51195EF00B0D0AA16602C37E3@STPETE> (Ben Key's message of "Thu, 19 Sep 2002 14:53:09 -0400") Original-Lines: 24 User-Agent: Gnus/5.090007 (Oort Gnus v0.07) Emacs/21.2.90 (i386-mingw-nt5.0.2195) X-Sender: 320041125923-0001@t-dialin.net 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:8075 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:8075 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