From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Joshua Datko Newsgroups: gmane.lisp.guile.user Subject: Creating a new port in C for use in guile Date: Tue, 02 Sep 2014 16:28:44 -0600 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1409697039 23369 80.91.229.3 (2 Sep 2014 22:30:39 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 2 Sep 2014 22:30:39 +0000 (UTC) To: guile-user@gnu.org Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Wed Sep 03 00:30:33 2014 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XOwat-0001R4-CC for guile-user@m.gmane.org; Wed, 03 Sep 2014 00:30:31 +0200 Original-Received: from localhost ([::1]:40527 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XOwas-0006cY-VP for guile-user@m.gmane.org; Tue, 02 Sep 2014 18:30:30 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43415) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XOwae-0006cI-T5 for guile-user@gnu.org; Tue, 02 Sep 2014 18:30:22 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XOwaY-0003Ju-PM for guile-user@gnu.org; Tue, 02 Sep 2014 18:30:16 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:38818) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XOwaY-0003JR-J3 for guile-user@gnu.org; Tue, 02 Sep 2014 18:30:10 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1XOwaQ-0001CR-Cn for guile-user@gnu.org; Wed, 03 Sep 2014 00:30:02 +0200 Original-Received: from c-98-245-156-31.hsd1.co.comcast.net ([98.245.156.31]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 03 Sep 2014 00:30:02 +0200 Original-Received: from jbdatko by c-98-245-156-31.hsd1.co.comcast.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 03 Sep 2014 00:30:02 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 18 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: c-98-245-156-31.hsd1.co.comcast.net User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (darwin) Cancel-Lock: sha1:keuqHrfyERkKNBlnGdnmtu5pR2k= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Original-Sender: guile-user-bounces+guile-user=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.user:11447 Archived-At: I want to make a new Port. I would like to write the port implementation in C and use that port in scheme. I'm a bit confused on how to proceed though. From reading the docs, it seems I have to create a C function, in the form of an extension, that calls scm_make_port_type. However, the manual states [1] that the return value from scm_make_port_type is a scm_ptob_descriptor. I'm confused on how I instantiate this new port type to get a scm_port. What am I missing? Thanks, Josh [1] https://www.gnu.org/software/guile/manual/guile.html#Port-Implementation