1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-04 11:10:27 +02:00
guile/module/ice-9/deprecated.scm
Andy Wingo 3a9c0939a0 Move make-object-property out to a module
This will allow for weak tables to be implemented partly in Scheme.

* module/ice-9/object-properties.scm: New file.

* am/bootstrap.am (SOURCES): Add new file.

* module/ice-9/boot-9.scm:
* module/ice-9/deprecated.scm (make-object-property*): Deprecate
make-object-property in default env and add a shim.

* module/ice-9/buffered-input.scm (ice-9):
* module/language/elisp/boot.el (plist-function):
* module/scripts/frisk.scm (scripts):
* module/web/http.scm (web): Adapt users to import the new module.
2025-05-12 13:45:07 +02:00

50 lines
1.8 KiB
Scheme

;;;; Copyright (C) 2025 Free Software Foundation, Inc.
;;;;
;;;; This library is free software; you can redistribute it and/or
;;;; modify it under the terms of the GNU Lesser General Public
;;;; License as published by the Free Software Foundation; either
;;;; version 3 of the License, or (at your option) any later version.
;;;;
;;;; This library is distributed in the hope that it will be useful,
;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
;;;; Lesser General Public License for more details.
;;;;
;;;; You should have received a copy of the GNU Lesser General Public
;;;; License along with this library; if not, write to the Free Software
;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
;;;;
(define-module (ice-9 deprecated)
#:use-module (ice-9 guardians)
#:use-module (ice-9 object-properties)
#:export ((make-guardian* . make-guardian)
module-observe-weak
(make-object-property* . make-object-property)))
#;
(define-syntax-rule (define-deprecated name message exp)
(begin
(define-syntax rule
(identifier-syntax
(begin
(issue-deprecation-warning message)
exp)))
(export rule)))
(define (make-guardian*)
(issue-deprecation-warning
"make-guardian in the default environment is deprecated. Import it
from (ice-9 guardians) instead.")
(make-guardian))
(define* (module-observe-weak module observer-id #:optional (proc observer-id))
(issue-deprecation-warning
"module-observe-weak is deprecated. Use module-observe instead.")
(module-observe module proc))
(define (make-object-property*)
(issue-deprecation-warning
"make-object-property in the default environment is deprecated. Import
it from (ice-9 object-properties) instead.")
(make-object-property))