From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Maciek Godek" Newsgroups: gmane.lisp.guile.user Subject: Passing C pointers through guile Date: Sat, 5 Jul 2008 00:18:32 +0200 Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1215209933 1705 80.91.229.12 (4 Jul 2008 22:18:53 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 4 Jul 2008 22:18:53 +0000 (UTC) To: guile-user@gnu.org Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Sat Jul 05 00:19:39 2008 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1KEtcr-0000gW-Ds for guile-user@m.gmane.org; Sat, 05 Jul 2008 00:19:33 +0200 Original-Received: from localhost ([127.0.0.1]:42587 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KEtc0-0000ZA-De for guile-user@m.gmane.org; Fri, 04 Jul 2008 18:18:40 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KEtbw-0000Xd-SJ for guile-user@gnu.org; Fri, 04 Jul 2008 18:18:36 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KEtbv-0000VJ-AI for guile-user@gnu.org; Fri, 04 Jul 2008 18:18:36 -0400 Original-Received: from [199.232.76.173] (port=42244 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KEtbv-0000VC-6Z for guile-user@gnu.org; Fri, 04 Jul 2008 18:18:35 -0400 Original-Received: from wf-out-1314.google.com ([209.85.200.174]:38421) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KEtbv-0001F2-Hy for guile-user@gnu.org; Fri, 04 Jul 2008 18:18:35 -0400 Original-Received: by wf-out-1314.google.com with SMTP id 28so1319451wfc.24 for ; Fri, 04 Jul 2008 15:18:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:mime-version:content-type:content-transfer-encoding :content-disposition; bh=Cbj8LveFwfsDGLHhLVmOO3LD4HjHDui5g37HAYp+lwA=; b=DrreRriHo+e/R24poRdLrcKYzFIG1iUu5bLvPgPgjTmeZTNo4PRItpfQvrw7EoDRpk 7ZFp0XFMJBbNqr4+S4GWgECD3qQOJQY1ZkqNgLuWe7HAAHUUk5rwLnUilyfGae7Uv//u ysOKY48+xmaLgMgkZi/pesRqZW8caMYwaPPWE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type :content-transfer-encoding:content-disposition; b=wbE2Icmzu3roy9iHjsdLRoEeG6tIBmAspoYk39855SNB81+z3/+BAaCk+lxCYLdI3P b8uvl9Dk59RErGYy3nY+T/hmtJrevs8gL+KIpW7iXWqnkqdXkazWdUPTJv4XGZhJoLzt 3EAWbA8xTNfOV66hmez7VIMIEQWx3Tyz6uVoM= Original-Received: by 10.142.179.12 with SMTP id b12mr391749wff.282.1215209912778; Fri, 04 Jul 2008 15:18:32 -0700 (PDT) Original-Received: by 10.142.141.17 with HTTP; Fri, 4 Jul 2008 15:18:32 -0700 (PDT) Content-Disposition: inline X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 2) 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:6626 Archived-At: Hi, is there any portable and recommended way for passing C pointers around in guile environment? I think of something like scm_to_ptr (analogous to scm_to_int etc.). Certainly such a value would be completely useless for the interpreter. One can achieve simillar functionality using the aforementioned scm_to_int (keeping track on the word length of the build target), but it seems rather unnatural. Perhaps the need for passing pointers is a sign of a weakness in design of a given system, is it so? very good regards mg