From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: ludovic.courtes@laas.fr (=?iso-8859-1?q?Ludovic_Court=E8s?=) Newsgroups: gmane.lisp.guile.user Subject: Exposing common type wrapping/unwrapping methods Date: Mon, 04 Apr 2005 16:37:34 +0200 Organization: LAAS-CNRS Message-ID: <87oecutxox.fsf@laas.fr> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1112640614 3026 80.91.229.2 (4 Apr 2005 18:50:14 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 4 Apr 2005 18:50:14 +0000 (UTC) Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Mon Apr 04 20:50:11 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DIWdQ-0006Bc-RU for guile-user@m.gmane.org; Mon, 04 Apr 2005 20:49:17 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DIWCA-0002Fj-1l for guile-user@m.gmane.org; Mon, 04 Apr 2005 14:21:06 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DITMU-00088r-4D for guile-user@gnu.org; Mon, 04 Apr 2005 11:19:34 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DIT1p-0008FK-7X for guile-user@gnu.org; Mon, 04 Apr 2005 10:58:15 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DISnw-0003Xj-MV for guile-user@gnu.org; Mon, 04 Apr 2005 10:43:52 -0400 Original-Received: from [140.93.0.15] (helo=laas.laas.fr) by monty-python.gnu.org with esmtp (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA:24) (Exim 4.34) id 1DISif-0006OJ-P2 for guile-user@gnu.org; Mon, 04 Apr 2005 10:38:26 -0400 Original-Received: by laas.laas.fr (8.13.1/8.13.1) with SMTP id j34Eahoc010453; Mon, 4 Apr 2005 16:36:44 +0200 (CEST) Original-To: guile-user@gnu.org X-URL: http://www.laas.fr/~lcourtes/ X-Revolutionary-Date: 15 Germinal an 213 de la =?iso-8859-1?q?R=E9volution?= X-PGP-Key-ID: 0xEB1F5364 X-PGP-Key: http://www.laas.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 821D 815D 902A 7EAB 5CEE D120 7FBA 3D4F EB1F 5364 X-OS: powerpc-unknown-linux-gnu User-Agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.3 (gnu/linux) X-Spam-Score: 0 () X-Scanned-By: MIMEDefang at CNRS-LAAS 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:4340 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.user:4340 Hi, Most type wrapping/unwrapping methods that are used within Guile are not exposed to the user, which is a pity. For example, `scm_addr_vector' (in socket.c) which converts a `sockaddr' structure to its Scheme representation (a vector) is defined as `static'. This leaves the C programmer with the following alternative: * use, e.g., `scm_connect ()' instead of `connect ()' in its C code; * define a new SMOB (or other representation) for `sockaddr' that may be incompatible with Guile's representation of this C type; * copy/paste Guile's conversion methods, hoping that they're going to remain valid. Obviously, the best solution would be to expose the relevant functions to the user. :-) What do you think? Thanks, Ludovic. _______________________________________________ Guile-user mailing list Guile-user@gnu.org http://lists.gnu.org/mailman/listinfo/guile-user