1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-24 12:20:20 +02:00

(system base types) knows about variables

* module/system/base/types.scm (%tc7-variable): New tc7.
  (cell->object): Handle tc7-variable.

* test-suite/tests/types.test ("opaque objects"): Add a test.
This commit is contained in:
Andy Wingo 2015-02-17 10:58:29 +01:00 committed by Ludovic Courtès
parent acd2c8e36a
commit 6cd1c6c79c
2 changed files with 5 additions and 1 deletions

View file

@ -241,6 +241,7 @@ the matching bits, possibly with bitwise operations to extract it from BITS."
;; Cell types.
(define %tc3-struct 1)
(define %tc7-symbol 5)
(define %tc7-variable 7)
(define %tc7-vector 13)
(define %tc7-wvect 15)
(define %tc7-string 21)
@ -423,6 +424,8 @@ using BACKEND."
(match (cell->object buf backend)
(($ <stringbuf> string)
(string->symbol string))))
(((_ & #x7f = %tc7-variable) obj)
(inferior-object 'variable address))
(((_ & #x7f = %tc7-string) buf start len)
(match (cell->object buf backend)
(($ <stringbuf> string)