1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-04-30 20:00:19 +02:00
guile/module/oop
Andy Wingo 48ad85fb56 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.
2014-04-27 11:02:35 +02:00
..
goops Improve correctness and consistency of 'eval-when' usage. 2014-01-23 10:41:22 -05:00
ChangeLog-2008 move ice-9/ and oop/ under module/ 2008-11-01 12:44:21 +01:00
goops.scm Fix foreign slot initialization and access 2014-04-27 11:02:35 +02:00