Reimplement %allocate-instance in Scheme
authorAndy Wingo <wingo@pobox.com>
Sun, 11 Jan 2015 18:11:41 +0000 (19:11 +0100)
committerAndy Wingo <wingo@pobox.com>
Fri, 23 Jan 2015 15:16:02 +0000 (16:16 +0100)
commit07452c83aee3a3ce0caa4cb61673351ed7007bea
treea8f26cc35911bbb7653fc6d3b4189c2868c70ebe
parent92928b8619d2711e9e05b94831a479525ba9aede
Reimplement %allocate-instance in Scheme

* libguile/goops.c (scm_sys_clear_fields_x): New function.
  (scm_sys_allocate_instance): Remove.  It was available to C but not to
  Scheme and it's really internal.
* libguile/goops.h: Remove scm_sys_allocate_instance.

* module/oop/goops.scm (%allocate-instance): Implement in Scheme, using
  allocate-struct and %clear-fields!.
  (make, shallow-clone, deep-clone, allocate-instance): Adapt to
  %allocate-instance not taking an initargs argument.
libguile/goops.c
libguile/goops.h
module/oop/goops.scm