From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Neil Jerram Newsgroups: gmane.lisp.guile.user Subject: Re: one C function to many Scheme functions Date: 09 Jan 2003 23:19:46 +0000 Sender: guile-user-bounces+guile-user=m.gmane.org@gnu.org Message-ID: References: <20030106203029.GA11033@gosia> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1042158211 17593 80.91.224.249 (10 Jan 2003 00:23:31 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Fri, 10 Jan 2003 00:23:31 +0000 (UTC) Cc: guile-user@gnu.org Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18WmxM-0004ZK-00 for ; Fri, 10 Jan 2003 01:23:28 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18WmsY-00018L-08 for guile-user@m.gmane.org; Thu, 09 Jan 2003 19:18:30 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 18Wmjn-0006BB-00 for guile-user@gnu.org; Thu, 09 Jan 2003 19:09:27 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 18Wmf6-0004bT-00 for guile-user@gnu.org; Thu, 09 Jan 2003 19:04:46 -0500 Original-Received: from mail.uklinux.net ([80.84.72.21] helo=s1.uklinux.net) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18WmAm-0005cK-00 for guile-user@gnu.org; Thu, 09 Jan 2003 18:33:16 -0500 Original-Received: from laruns.ossau.uklinux.net (bts-0588.dialup.zetnet.co.uk [194.247.50.76]) by s1.uklinux.net (8.11.6/8.11.6) with ESMTP id h09NXCV27929; Thu, 9 Jan 2003 23:33:12 GMT Original-Received: from laruns.ossau.uklinux.net.ossau.uklinux.net (localhost [127.0.0.1])ESMTP id 61DAEDC4D7; Thu, 9 Jan 2003 23:19:46 +0000 (GMT) Original-To: Matthias Koeppe In-Reply-To: Original-Lines: 24 User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7 X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: General Guile related discussions List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Xref: main.gmane.org gmane.lisp.guile.user:1518 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.user:1518 >>>>> "Matthias" == Matthias Koeppe writes: Matthias> Neil Jerram writes: >>>>>>> "bajcik" == bajcik writes: >> bajcik> But I want to declare many functions in a loop. I have a bajcik> table of names and a table of C-functions [ mytype_t bajcik> function(my_type arg) ] and only ONE C-function that bajcik> converts SCM to mytype_t. It is a wrapper. >> >> Guile does not have anything like gh_new_procedure_data. Matthias> What about applicable smobs? The OP could make a new Matthias> smob type for "1-argument C closures". The smob's APPLY Matthias> function would call the "wrapper" function, where the Matthias> "void *data" would be fed from SCM_SMOB_DATA. (I think Matthias> this requires a recent Guile (1.6).) I didn't know about those - so sorry for being over-categorical before. Does anyone have any docs or full examples on applicable smobs? Neil _______________________________________________ Guile-user mailing list Guile-user@gnu.org http://mail.gnu.org/mailman/listinfo/guile-user