guile-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Guile-commits] GNU Guile branch, master, updated. release_1-9-7-81-gdbd


From: Ludovic Courtès
Subject: [Guile-commits] GNU Guile branch, master, updated. release_1-9-7-81-gdbd9532
Date: Tue, 16 Feb 2010 23:52:14 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Guile".

http://git.savannah.gnu.org/cgit/guile.git/commit/?id=dbd9532e89d8aaed76fbaaa3a11388f6a4e9aefe

The branch, master has been updated
       via  dbd9532e89d8aaed76fbaaa3a11388f6a4e9aefe (commit)
       via  127f5c624d16f33da72a56e75a38912e06346113 (commit)
       via  f353687c688d20c9e8f42383d7f2e820a8834159 (commit)
       via  d2add8ae1164e2bd482a5c419e3c90211a8a312a (commit)
      from  a104b81cc40b5ff321605ca3731103bbd0e98894 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit dbd9532e89d8aaed76fbaaa3a11388f6a4e9aefe
Author: Ludovic Courtès <address@hidden>
Date:   Wed Feb 17 00:50:24 2010 +0100

    Update `NEWS'.

commit 127f5c624d16f33da72a56e75a38912e06346113
Author: Ludovic Courtès <address@hidden>
Date:   Wed Feb 17 00:44:56 2010 +0100

    Mention libffi dependency in `README'.

commit f353687c688d20c9e8f42383d7f2e820a8834159
Author: Ludovic Courtès <address@hidden>
Date:   Wed Feb 17 00:44:14 2010 +0100

    Include <libguile/__scm.h> in "foreign.h".
    
    * libguile/foreign.h: Include <libguile/__scm.h>.

commit d2add8ae1164e2bd482a5c419e3c90211a8a312a
Author: Ludovic Courtès <address@hidden>
Date:   Wed Feb 17 00:31:04 2010 +0100

    Remove misplaced tabs from the manual.
    
    * doc/ref/posix.texi (Network Databases): Remove tabs from `getaddrinfo'
      example.
    
    * .dir-locals.el: Set `indent-tabs-mode' to `t' for `texinfo-mode'.

-----------------------------------------------------------------------

Summary of changes:
 .dir-locals.el     |    3 +-
 NEWS               |   82 ++++++++++++++++++++++++++++++++++++----------------
 README             |    7 ++++
 doc/ref/posix.texi |    2 +-
 libguile/foreign.h |    8 ++--
 5 files changed, 71 insertions(+), 31 deletions(-)

diff --git a/.dir-locals.el b/.dir-locals.el
index b17c79b..ca0c337 100644
--- a/.dir-locals.el
+++ b/.dir-locals.el
@@ -4,4 +4,5 @@
                      (tab-width   .  8)))
  (c-mode          . ((c-file-style . "gnu")))
  (scheme-mode     . ((indent-tabs-mode . nil)))
- (emacs-lisp-mode . ((indent-tabs-mode . nil))))
+ (emacs-lisp-mode . ((indent-tabs-mode . nil)))
+ (texinfo-mode    . ((indent-tabs-mode . nil))))
diff --git a/NEWS b/NEWS
index 877e548..45b042d 100644
--- a/NEWS
+++ b/NEWS
@@ -25,41 +25,63 @@ unavailable.
 
 ** Foreign function interface
 
-dynamic-link / dynamic-func still get the syms; we just added a libffi
-interface to call functions. integer, floating point, pointer, and
-struct types supported. simple finalization interface; complicated users
-to use guardians. (system foreign); high-level wrapper needed. vm
-integration. bytevector integration.
+This release comes with a new `(system foreign)' module.  Currently it
+provides a low level "foreign function interface" (FFI), which allows
+users to write Scheme code to invoke C code, without writing a single
+line of C code.
+
+The `dynamic-link' and `dynamic-func' procedures, which have been
+available for a long time, can be used to get the address of a C
+function as a "foreign" object at the Scheme level; using libffi, Guile
+can construct calls to these functions.
+
+The arguments to a C function may be integers, floating point numbers,
+pointers, and structs.  From Scheme they are all represented as foreign
+objects.  Foreign objects can be converted back and forth to/from a
+bytevector.  They can have an associated finalizer (e.g., a procedure
+that will reclaim any associated resources when the object becomes
+unreachable); alternatively, they can be finalized using a guardian.
+
+The `(system foreign)' API is currently low-level and possibly
+inconvenient.  It will be extended to provide higher-level constructs.
 
 ** Incompatible changes to the foreign value interface introduced in 1.9.7
 
-C extensions need recompilation
+The API in <libguile/foreign.h> changed since 1.9.7.  C extensions need
+recompilation.
 
-** dynamic-wind compilation
+** `dynamic-wind' compilation
 
-inline body thunk; wind/unwind via VM; add to tree-il
+`dynamic-wind' now has special support from the compiler and VM.  The
+compiler is able to inline the body of a `dynamic-wind', making it more
+efficient.  The run-time support is provided by the `wind' and `unwind'
+VM instructions.
 
-** vlists
+** New module: `(ice-9 vlist)'
 
-vlists and vhashes. used internally. composed of awesome.
+This module provides an implementation of Bagwell's VLists and
+VList-based hash lists ("VHashes").  VLists are a list data structure
+that provides constant-time random access and length computation
+logarithmic in the number of elements.  VLists also use less storage
+space than standard Scheme linked lists.
 
-** getaddrinfo
+VHashes are a functional dictionary type similar to association lists.
+However, unlike association lists, accessing a value given its key is
+typically a constant-time operation.  VHashes are now used in a few
+places of the compiler.
 
-    * libguile/net_db.c (sym_getaddrinfo_error, sym_ai_passive,
-      sym_ai_canonname, sym_ai_numerichost, sym_ai_numericserv,
-      sym_ai_v4mapped, sym_ai_all, sym_ai_addrconfig, sym_eai_badflags,
-      sym_eai_noname, sym_eai_again, sym_eai_fail, sym_eai_family,
-      sym_eai_socktype, sym_eai_service, sym_eai_memory, sym_eai_system,
-      sym_eai_overflow, sym_eai_nodata, sym_eai_addrfamily,
-      sym_eai_inprogress, sym_eai_canceled, sym_eai_notcanceled,
-      sym_eai_alldone, sym_eai_intr, sym_eai_idn_encode): New variables.
-      (scm_from_addrinfo, scm_getaddrinfo, scm_gai_strerror): New functions.
-    
-    * module/ice-9/networking.scm (addrinfo:flags, addrinfo:fam,
-      addrinfo:socktype, addrinfo:protocol, addrinfo:addr,
-      addrinfo:canonname): New procedures.
+** New procedures: `getaddrinfo' and family
+
+Bindings for the POSIX getaddrinfo(3) host name and service lookup
+function are available.  This function is now recommended over
+`gethostname' and friends as it's more expressive and can return a
+sorted list of addresses, as opposed to a single address.
 
-** tutorial deleted
+** Tutorial deleted
+
+The tutorial was removed.  It was incomplete, outdated, and contained C
+examples that were no longer valid.  The reference manual, on the other
+hand, contains up-to-date examples and documentation.
 
 ** And of course, the usual collection of bugfixes
  
@@ -76,6 +98,8 @@ Changes in 1.9.x (since the 1.8.x series):
 ** `(rnrs bytevector)', the R6RS bytevector API
 ** `(rnrs io ports)', a subset of the R6RS I/O port API
 ** `(system xref)', a cross-referencing facility (FIXME undocumented)
+** `(ice-9 vlist)', lists with constant-time random access; hash lists
+** `(system foreign)', foreign function interface (FIXME: undocumented)
 
 ** Imported statprof, SSAX, and texinfo modules from Guile-Lib
     
@@ -253,6 +277,10 @@ in the next prerelease.
 
 Scheme binding for the `getsid' C library call.
 
+** New POSIX procedure: `getaddrinfo'
+
+Scheme binding for the `getaddrinfo' C library function.
+
 ** New procedure in `(oops goops)': `method-formals'
 
 ** BUG: (procedure-property func 'arity) does not work on compiled
@@ -1228,6 +1256,10 @@ See http://www.hpl.hp.com/personal/Hans_Boehm/gc/, for 
more information.
 See http://www.gnu.org/software/libunistring/, for more information. Our
 Unicode support uses routines from libunistring.
 
+** New dependency: libffi
+
+See http://sourceware.org/libffi/, for more information.
+
 
 
 Changes in 1.8.8 (since 1.8.7)
diff --git a/README b/README
index ea68081..90914e1 100644
--- a/README
+++ b/README
@@ -34,6 +34,7 @@ Guile depends on the following external libraries.
 - libltdl
 - libunistring
 - libgc
+- libffi
 It will also use the libreadline library if it is available.  For each
 of these there is a corresponding --with-XXX-prefix option that you
 can use when invoking ./configure, if you have these libraries
@@ -91,6 +92,12 @@ Guile requires the following external packages:
     conservative garbage collector used by Guile.  It is available
     from http://www.hpl.hp.com/personal/Hans_Boehm/gc/ .
 
+  - libffi
+
+    libffi provides a "foreign function interface", used by the
+    `(system foreign)' module.  It is available from
+    http://sourceware.org/libffi/ .
+
   - pkg-config
 
     Guile's ./configure script uses pkg-config to discover the correct
diff --git a/doc/ref/posix.texi b/doc/ref/posix.texi
index 85df34f..89f8e84 100644
--- a/doc/ref/posix.texi
+++ b/doc/ref/posix.texi
@@ -2355,7 +2355,7 @@ which to address the specified service.
 @example
 (let* ((ai (car (getaddrinfo "www.gnu.org" "http")))
        (s  (socket (addrinfo:fam ai) (addrinfo:socktype ai)
-                  (addrinfo:protocol ai))))
+                   (addrinfo:protocol ai))))
   (connect s (addrinfo:addr ai))
   s)
 @end example
diff --git a/libguile/foreign.h b/libguile/foreign.h
index b29025d..303bb27 100644
--- a/libguile/foreign.h
+++ b/libguile/foreign.h
@@ -1,3 +1,6 @@
+#ifndef SCM_FOREIGN_H
+#define SCM_FOREIGN_H
+
 /* Copyright (C) 2010  Free Software Foundation, Inc.
  *
  * This library is free software; you can redistribute it and/or
@@ -16,10 +19,7 @@
  * 02110-1301 USA
  */
 
-#ifndef SCM_FOREIGN_H
-#define SCM_FOREIGN_H
-
-
+#include "libguile/__scm.h"
 
 /* A foreign value is some value that exists outside of Guile. It is 
represented
    by a cell whose second word is a pointer. The first word has the


hooks/post-receive
-- 
GNU Guile




reply via email to

[Prev in Thread] Current Thread [Next in Thread]