[obsolete api] improve deprecation warnings

This commit is contained in:
Christopher Lam 2018-09-09 18:41:13 +08:00
parent 768ed09977
commit c76ea30f3a
2 changed files with 4 additions and 2 deletions

View File

@ -94,7 +94,8 @@
;; Helper for warnings below. ;; Helper for warnings below.
(define (gnc-commodity-numeric->string commodity numeric) (define (gnc-commodity-numeric->string commodity numeric)
(issue-deprecation-warning "gnc-commodity-numeric->string deprecated.") (issue-deprecation-warning "gnc-commodity-numeric->string deprecated. \
construct with gnc:make-gnc-monetary and gnc:monetary->string instead.")
(gnc:monetary->string (gnc:monetary->string
(gnc:make-gnc-monetary commodity numeric))) (gnc:make-gnc-monetary commodity numeric)))

View File

@ -38,7 +38,8 @@
;; pair is a list of one gnc:commodity and one gnc:numeric ;; pair is a list of one gnc:commodity and one gnc:numeric
;; value. Deprecated -- use <gnc-monetary> instead. ;; value. Deprecated -- use <gnc-monetary> instead.
(define (gnc-commodity-value->string pair) (define (gnc-commodity-value->string pair)
(issue-deprecation-warning "gnc-commodity-value->string deprecated") (issue-deprecation-warning "gnc-commodity-value->string deprecated. \
construct gnc:make-gnc-monetary and use gnc:monetary->string instead.")
(xaccPrintAmount (xaccPrintAmount
(cadr pair) (gnc-commodity-print-info (car pair) #t))) (cadr pair) (gnc-commodity-print-info (car pair) #t)))