mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-01 12:20:26 +02:00
all deprecated routines emit warnings
* module/ice-9/deprecated.scm (substring-move-left!) (substring-move-right!, dynamic-maybe-call, dynamic-maybe-link) (try-module-linked, try-module-dynamic-link) ($asinh, $acosh, $atanh, $sqrt, $abs, $exp, $log, $sin, $cos) ($tan, $asin, $acos, $atan, $sinh, $cosh, $tanh) (process-define-module): Add deprecation warnings.
This commit is contained in:
parent
8f6a4b248b
commit
d147fe2e68
1 changed files with 94 additions and 29 deletions
|
@ -1,4 +1,4 @@
|
||||||
;;;; Copyright (C) 2003, 2005, 2006, 2009, 2010 Free Software Foundation, Inc.
|
;;;; Copyright (C) 2003, 2005, 2006, 2009, 2010, 2011 Free Software Foundation, Inc.
|
||||||
;;;;
|
;;;;
|
||||||
;;;; This library is free software; you can redistribute it and/or
|
;;;; This library is free software; you can redistribute it and/or
|
||||||
;;;; modify it under the terms of the GNU Lesser General Public
|
;;;; modify it under the terms of the GNU Lesser General Public
|
||||||
|
@ -72,8 +72,17 @@
|
||||||
|
|
||||||
;;;; Deprecated definitions.
|
;;;; Deprecated definitions.
|
||||||
|
|
||||||
(define substring-move-left! substring-move!)
|
(define substring-move-left!
|
||||||
(define substring-move-right! substring-move!)
|
(lambda args
|
||||||
|
(issue-deprecation-warning
|
||||||
|
"`substring-move-left!' is deprecated. Use `substring-move!' instead.")
|
||||||
|
(apply substring-move! args)))
|
||||||
|
(define substring-move-right!
|
||||||
|
(lambda args
|
||||||
|
(issue-deprecation-warning
|
||||||
|
"`substring-move-right!' is deprecated. Use `substring-move!' instead.")
|
||||||
|
(apply substring-move! args)))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
;; This method of dynamically linking Guile Extensions is deprecated.
|
;; This method of dynamically linking Guile Extensions is deprecated.
|
||||||
|
@ -136,18 +145,17 @@
|
||||||
registered-modules))
|
registered-modules))
|
||||||
|
|
||||||
(define (dynamic-maybe-call name dynobj)
|
(define (dynamic-maybe-call name dynobj)
|
||||||
(catch #t ; could use false-if-exception here
|
(issue-deprecation-warning
|
||||||
(lambda ()
|
"`dynamic-maybe-call' is deprecated. "
|
||||||
(dynamic-call name dynobj))
|
"Wrap `dynamic-call' in a `false-if-exception' yourself.")
|
||||||
(lambda args
|
(false-if-exception (dynamic-call name dynobj)))
|
||||||
#f)))
|
|
||||||
|
|
||||||
(define (dynamic-maybe-link filename)
|
(define (dynamic-maybe-link filename)
|
||||||
(catch #t ; could use false-if-exception here
|
(issue-deprecation-warning
|
||||||
(lambda ()
|
"`dynamic-maybe-link' is deprecated. "
|
||||||
(dynamic-link filename))
|
"Wrap `dynamic-link' in a `false-if-exception' yourself.")
|
||||||
(lambda args
|
(false-if-exception (dynamic-link filename)))
|
||||||
#f)))
|
|
||||||
|
|
||||||
(define (find-and-link-dynamic-module module-name)
|
(define (find-and-link-dynamic-module module-name)
|
||||||
(define (make-init-name mod-name)
|
(define (make-init-name mod-name)
|
||||||
|
@ -212,9 +220,15 @@
|
||||||
(register-modules dynobj)))
|
(register-modules dynobj)))
|
||||||
|
|
||||||
(define (try-module-linked module-name)
|
(define (try-module-linked module-name)
|
||||||
|
(issue-deprecation-warning
|
||||||
|
"`try-module-linked' is deprecated."
|
||||||
|
"See the manual for how more on C extensions.")
|
||||||
(init-dynamic-module module-name))
|
(init-dynamic-module module-name))
|
||||||
|
|
||||||
(define (try-module-dynamic-link module-name)
|
(define (try-module-dynamic-link module-name)
|
||||||
|
(issue-deprecation-warning
|
||||||
|
"`try-module-dynamic-link' is deprecated."
|
||||||
|
"See the manual for how more on C extensions.")
|
||||||
(and (find-and-link-dynamic-module module-name)
|
(and (find-and-link-dynamic-module module-name)
|
||||||
(init-dynamic-module module-name)))
|
(init-dynamic-module module-name)))
|
||||||
|
|
||||||
|
@ -262,22 +276,70 @@
|
||||||
"`unmemoize-expr' is deprecated. Use `unmemoize-expression' instead.")
|
"`unmemoize-expr' is deprecated. Use `unmemoize-expression' instead.")
|
||||||
(apply unmemoize-expression args))
|
(apply unmemoize-expression args))
|
||||||
|
|
||||||
(define ($asinh z) (asinh z))
|
(define ($asinh z)
|
||||||
(define ($acosh z) (acosh z))
|
(issue-deprecation-warning
|
||||||
(define ($atanh z) (atanh z))
|
"`$asinh' is deprecated. Use `asinh' instead.")
|
||||||
(define ($sqrt z) (sqrt z))
|
(asinh z))
|
||||||
(define ($abs z) (abs z))
|
(define ($acosh z)
|
||||||
(define ($exp z) (exp z))
|
(issue-deprecation-warning
|
||||||
(define ($log z) (log z))
|
"`$acosh' is deprecated. Use `acosh' instead.")
|
||||||
(define ($sin z) (sin z))
|
(acosh z))
|
||||||
(define ($cos z) (cos z))
|
(define ($atanh z)
|
||||||
(define ($tan z) (tan z))
|
(issue-deprecation-warning
|
||||||
(define ($asin z) (asin z))
|
"`$atanh' is deprecated. Use `atanh' instead.")
|
||||||
(define ($acos z) (acos z))
|
(atanh z))
|
||||||
(define ($atan z) (atan z))
|
(define ($sqrt z)
|
||||||
(define ($sinh z) (sinh z))
|
(issue-deprecation-warning
|
||||||
(define ($cosh z) (cosh z))
|
"`$sqrt' is deprecated. Use `sqrt' instead.")
|
||||||
(define ($tanh z) (tanh z))
|
(sqrt z))
|
||||||
|
(define ($abs z)
|
||||||
|
(issue-deprecation-warning
|
||||||
|
"`$abs' is deprecated. Use `abs' instead.")
|
||||||
|
(abs z))
|
||||||
|
(define ($exp z)
|
||||||
|
(issue-deprecation-warning
|
||||||
|
"`$exp' is deprecated. Use `exp' instead.")
|
||||||
|
(exp z))
|
||||||
|
(define ($log z)
|
||||||
|
(issue-deprecation-warning
|
||||||
|
"`$log' is deprecated. Use `log' instead.")
|
||||||
|
(log z))
|
||||||
|
(define ($sin z)
|
||||||
|
(issue-deprecation-warning
|
||||||
|
"`$sin' is deprecated. Use `sin' instead.")
|
||||||
|
(sin z))
|
||||||
|
(define ($cos z)
|
||||||
|
(issue-deprecation-warning
|
||||||
|
"`$cos' is deprecated. Use `cos' instead.")
|
||||||
|
(cos z))
|
||||||
|
(define ($tan z)
|
||||||
|
(issue-deprecation-warning
|
||||||
|
"`$tan' is deprecated. Use `tan' instead.")
|
||||||
|
(tan z))
|
||||||
|
(define ($asin z)
|
||||||
|
(issue-deprecation-warning
|
||||||
|
"`$asin' is deprecated. Use `asin' instead.")
|
||||||
|
(asin z))
|
||||||
|
(define ($acos z)
|
||||||
|
(issue-deprecation-warning
|
||||||
|
"`$acos' is deprecated. Use `acos' instead.")
|
||||||
|
(acos z))
|
||||||
|
(define ($atan z)
|
||||||
|
(issue-deprecation-warning
|
||||||
|
"`$atan' is deprecated. Use `atan' instead.")
|
||||||
|
(atan z))
|
||||||
|
(define ($sinh z)
|
||||||
|
(issue-deprecation-warning
|
||||||
|
"`$sinh' is deprecated. Use `sinh' instead.")
|
||||||
|
(sinh z))
|
||||||
|
(define ($cosh z)
|
||||||
|
(issue-deprecation-warning
|
||||||
|
"`$cosh' is deprecated. Use `cosh' instead.")
|
||||||
|
(cosh z))
|
||||||
|
(define ($tanh z)
|
||||||
|
(issue-deprecation-warning
|
||||||
|
"`$tanh' is deprecated. Use `tanh' instead.")
|
||||||
|
(tanh z))
|
||||||
|
|
||||||
(define (closure? x)
|
(define (closure? x)
|
||||||
(issue-deprecation-warning
|
(issue-deprecation-warning
|
||||||
|
@ -705,6 +767,9 @@ it.")
|
||||||
(define (unrecognized arg)
|
(define (unrecognized arg)
|
||||||
(error "unrecognized define-module argument" arg))
|
(error "unrecognized define-module argument" arg))
|
||||||
|
|
||||||
|
(issue-deprecation-warning
|
||||||
|
"`process-define-module' is deprecated. Use `define-module*' instead.")
|
||||||
|
|
||||||
(let ((name (car args))
|
(let ((name (car args))
|
||||||
(filename #f)
|
(filename #f)
|
||||||
(pure? #f)
|
(pure? #f)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue