diff options
author | Andy Wingo <wingo@pobox.com> | 2014-04-27 11:02:35 +0200 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2014-04-27 11:02:35 +0200 |
commit | 48ad85fb56bc022ac10f42cf07b5657d75b5b696 (patch) | |
tree | 3523ccd6bfb489e6fcdc44d27b8d6d78dcee06d8 /libguile/foreign-object.h | |
parent | fa1a30726dc28c58cb01594ae6df27e80d4c2f00 (diff) |
Fix foreign slot initialization and access
* libguile/goops.c (scm_sys_initialize_object): Refactor initialization
so that we don't ref uninitialized slots before initializing them.
This allows foreign slots, whose initial value is 0, to be initialized
via #:init-form.
* module/oop/goops.scm (@slot-ref, @slot-set!): Remove definitions.
Change callers to use struct-ref and struct-set!. slot-ref and
slot-set! were only marginally more efficient and were much more
dangerous. This change allows the standard accessors to work on
foreign slots; that was not the case before, as the 'u' fields of the
struct were read as if they were 'p' slots.
* module/language/tree-il/compile-glil.scm (lambda): Remove support for
compiling @slot-ref/@slot-set!. These were private to GOOPS.
* test-suite/tests/goops.test ("active-slot"): Update to not expect a
ref before initialization.
("foreign slots"): Add tests.
Diffstat (limited to 'libguile/foreign-object.h')
0 files changed, 0 insertions, 0 deletions