From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Mike Gran Newsgroups: gmane.lisp.guile.user Subject: Re: C structures Date: Fri, 30 Dec 2005 07:58:30 -0800 (PST) Message-ID: <20051230155830.68317.qmail@web32514.mail.mud.yahoo.com> References: <20051230101106.7f3ab576.leonardolopespereira@gmail.com> Reply-To: spikegran@earthlink.net NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: sea.gmane.org 1135961028 31832 80.91.229.2 (30 Dec 2005 16:43:48 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 30 Dec 2005 16:43:48 +0000 (UTC) Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Fri Dec 30 17:43:46 2005 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EsNLe-000889-CD for guile-user@m.gmane.org; Fri, 30 Dec 2005 17:43:23 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EsNJG-00014v-0A for guile-user@m.gmane.org; Fri, 30 Dec 2005 11:40:54 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EsMfm-0004ax-3p for guile-user@gnu.org; Fri, 30 Dec 2005 11:00:06 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EsMfj-0004ab-LV for guile-user@gnu.org; Fri, 30 Dec 2005 11:00:05 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EsMfi-0004aW-Oc for guile-user@gnu.org; Fri, 30 Dec 2005 11:00:03 -0500 Original-Received: from [68.142.207.224] (helo=web32514.mail.mud.yahoo.com) by monty-python.gnu.org with smtp (Exim 4.34) id 1EsMgG-0001Dt-E8 for guile-user@gnu.org; Fri, 30 Dec 2005 11:00:36 -0500 Original-Received: (qmail 68319 invoked by uid 60001); 30 Dec 2005 15:58:30 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Reply-To:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=FSymZIqyAJHb2KnSTcuyzkEkgfT9s+zA27eSqc8KpNxwBHCsk1/zwippzznA3LvZAyislvHGHJzY1LV1fHJtUrcqY3EybjzOjoQpQKOXruooycur5cP2HChMLfmKkI1JiXxCETkezs9mvuPO4k9ZgujKmc37UQOCOwrNzNOZ5Yg= ; Original-Received: from [209.178.129.250] by web32514.mail.mud.yahoo.com via HTTP; Fri, 30 Dec 2005 07:58:30 PST Original-To: Leonardo Lopes Pereira , guile-user@gnu.org In-Reply-To: <20051230101106.7f3ab576.leonardolopespereira@gmail.com> X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-user-bounces+guile-user=m.gmane.org@gnu.org Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.user:5004 Archived-At: Leonardo- A "list" can hold any type of data, so it shouldn't be a problem to unpack a struct into a list. There really isn't a way to automatically convert a C struct into a list. You'd have to convert each element of the struct into a Guile type, then assemble them into a list. Converting a C struct to a list is a good idea if you're giving the C data to Guile, and you won't need the C struct to be valid afterwards. If you want Guile to operate on the C struct directly because it needs to remain relevant, then a different approach is used. Which of the following are you trying to accomplish? 1. You want to make C data available to Guile functions, and once that data is passed to Guile, it never (or rarely) needs to be handed back to C. 2. You want the C code and the Guile code to be able to operate on the same C structs at the same time. -- Mike Gran --- Leonardo Lopes Pereira wrote: > I would like to know if is there any way to convert C structs to any > type of Guile data. > > __________________________________________ Yahoo! DSL – Something to write home about. Just $16.99/mo. or less. dsl.yahoo.com _______________________________________________ Guile-user mailing list Guile-user@gnu.org http://lists.gnu.org/mailman/listinfo/guile-user