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=5f8d67ad09d21263d1ea2d537afcc5464d922dc5 The branch, stable-2.0 has been updated via 5f8d67ad09d21263d1ea2d537afcc5464d922dc5 (commit) via 581bd72a7d8346d32d02379d64b3012fdd6eef31 (commit) via 2921f537609547e7c9ee0df555a840407313eabd (commit) via 0bb1353a6b618f1b355da13b6b7c3b56b201a2dc (commit) via 66b1dbf649c82e34aa6d62a982cae3218419d160 (commit) from d192791373b79e905eb02f9c0b01413051a7b2f8 (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 ----------------------------------------------------------------- ----------------------------------------------------------------------- Summary of changes: libguile/print.c | 8 +++----- libguile/struct.c | 2 ++ module/ice-9/boot-9.scm | 17 +++++++---------- module/srfi/srfi-35.scm | 16 ++++++++-------- 4 files changed, 20 insertions(+), 23 deletions(-) diff --git a/libguile/print.c b/libguile/print.c index 2fc536b..cb3c0b9 100644 --- a/libguile/print.c +++ b/libguile/print.c @@ -1544,14 +1544,12 @@ SCM_DEFINE (scm_get_print_state, "get-print-state", 1, 0, 0, void scm_init_print () { - SCM vtable, layout, type; + SCM type; scm_gc_register_root (&print_state_pool); scm_gc_register_root (&scm_print_state_vtable); - vtable = scm_make_vtable_vtable (scm_nullstr, SCM_INUM0, SCM_EOL); - layout = - scm_make_struct_layout (scm_from_locale_string (SCM_PRINT_STATE_LAYOUT)); - type = scm_make_struct (vtable, SCM_INUM0, scm_list_1 (layout)); + type = scm_make_vtable (scm_from_locale_string (SCM_PRINT_STATE_LAYOUT), + SCM_BOOL_F); scm_set_struct_vtable_name_x (type, scm_from_latin1_symbol ("print-state")); scm_print_state_vtable = type; diff --git a/libguile/struct.c b/libguile/struct.c index e6c7f4b..a5c4e3a 100644 --- a/libguile/struct.c +++ b/libguile/struct.c @@ -1022,11 +1022,13 @@ scm_init_struct () GC_REGISTER_DISPLACEMENT (2 * sizeof (scm_t_bits)); required_vtable_fields = scm_from_locale_string (SCM_VTABLE_BASE_LAYOUT); + scm_c_define ("standard-vtable-fields", required_vtable_fields); required_applicable_fields = scm_from_locale_string (SCM_APPLICABLE_BASE_LAYOUT); required_applicable_with_setter_fields = scm_from_locale_string (SCM_APPLICABLE_WITH_SETTER_BASE_LAYOUT); scm_standard_vtable_vtable = scm_make_vtable_vtable (scm_nullstr, SCM_INUM0, SCM_EOL); + scm_c_define ("<standard-vtable>", scm_standard_vtable_vtable); scm_applicable_struct_vtable_vtable = scm_make_struct (scm_standard_vtable_vtable, SCM_INUM0, diff --git a/module/ice-9/boot-9.scm b/module/ice-9/boot-9.scm index f4ed1df..5ed543a 100644 --- a/module/ice-9/boot-9.scm +++ b/module/ice-9/boot-9.scm @@ -1050,16 +1050,13 @@ VALUE." ;; 0: type-name, 1: fields, 2: constructor (define record-type-vtable - ;; FIXME: This should just call make-vtable, not make-vtable-vtable; but for - ;; that we need to expose the bare vtable-vtable to Scheme. - (make-vtable-vtable "prprpw" 0 - (lambda (s p) - (cond ((eq? s record-type-vtable) - (display "#<record-type-vtable>" p)) - (else - (display "#<record-type " p) - (display (record-type-name s) p) - (display ">" p)))))) + (let ((s (make-vtable (string-append standard-vtable-fields "prprpw") + (lambda (s p) + (display "#<record-type " p) + (display (record-type-name s) p) + (display ">" p))))) + (set-struct-vtable-name! s 'record-type) + s)) (define (record-type? obj) (and (struct? obj) (eq? record-type-vtable (struct-vtable obj)))) diff --git a/module/srfi/srfi-35.scm b/module/srfi/srfi-35.scm index d2b9c94..8f86bce 100644 --- a/module/srfi/srfi-35.scm +++ b/module/srfi/srfi-35.scm @@ -48,14 +48,14 @@ ;; The vtable of all condition types. ;; vtable fields: vtable, self, printer ;; user fields: id, parent, all-field-names - (make-vtable-vtable "prprpr" 0 - (lambda (ct port) - (if (eq? ct %condition-type-vtable) - (display "#<condition-type-vtable>") - (format port "#<condition-type ~a ~a>" - (condition-type-id ct) - (number->string (object-address ct) - 16)))))) + (let ((s (make-vtable (string-append standard-vtable-fields "prprpr") + (lambda (ct port) + (format port "#<condition-type ~a ~a>" + (condition-type-id ct) + (number->string (object-address ct) + 16)))))) + (set-struct-vtable-name! s 'condition-type) + s)) (define (%make-condition-type layout id parent all-fields) (let ((struct (make-struct %condition-type-vtable 0 hooks/post-receive -- GNU Guile
