deprecations: clarify functions deprecated in 4.x.

This commit is contained in:
Christopher Lam
2020-06-22 19:17:48 +08:00
parent f072fef014
commit 851bc7f8d9
9 changed files with 11 additions and 10 deletions

View File

@@ -100,7 +100,7 @@
(define (gnc:owner-from-split split result-owner)
(define (notnull x) (and (not (null? x)) x))
(issue-deprecation-warning
"gnc:owner-from-split is deprecated. use gnc:split->owner instead.")
"gnc:owner-from-split is deprecated in 4.x. use gnc:split->owner instead.")
(let* ((trans (xaccSplitGetParent split))
(invoice (notnull (gncInvoiceGetInvoiceFromTxn trans)))
(temp (gncOwnerNew))

View File

@@ -30,6 +30,7 @@
(use-modules (ice-9 match))
(define (deprecate . lst)
;; 4.x deprecation. remove in 5.x
(issue-deprecation-warning (string-concatenate lst)))
(define (no-op-deprecation-warning)

View File

@@ -154,7 +154,7 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(define-public (gnc:substring-replace-from-to s1 s2 s3 start end-after)
(issue-deprecation-warning "gnc:substring-replace-from-to is deprecated.")
(issue-deprecation-warning "gnc:substring-replace-from-to is deprecated in 4.x.")
(string-replace-substring
s1 s2 s3 0 (string-length s1) (max 0 (1- start))
(and (positive? end-after) (+ (max 0 (1- start)) (1- end-after)))))