mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-06 04:00:26 +02:00
* boot-9.scm (make-object-property): New function.
This commit is contained in:
parent
db36bd509b
commit
2d55a919c3
1 changed files with 11 additions and 0 deletions
|
@ -153,6 +153,17 @@
|
||||||
(if pair
|
(if pair
|
||||||
(symbol-pset! sym (delq! pair (symbol-pref sym))))))
|
(symbol-pset! sym (delq! pair (symbol-pref sym))))))
|
||||||
|
|
||||||
|
;;; {General Properties}
|
||||||
|
|
||||||
|
;; This is a more modern interface to properties. It will replace all
|
||||||
|
;; other property-like things eventually.
|
||||||
|
|
||||||
|
(define (make-object-property)
|
||||||
|
(let ((prop (primitive-make-property #f)))
|
||||||
|
(make-procedure-with-setter
|
||||||
|
(lambda (obj) (primitive-property-ref prop obj))
|
||||||
|
(lambda (obj val) (primitive-property-set! prop obj val)))))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
;;; {Line and Delimited I/O}
|
;;; {Line and Delimited I/O}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue