Skip to content

Commit

Permalink
[report-utilities] deprecate gnc:commodity-collectorlist-get-merged
Browse files Browse the repository at this point in the history
this function is unused
  • Loading branch information
christopherlam committed Feb 18, 2019
1 parent d7190c0 commit 51b6cf6
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion gnucash/report/report-system/report-system.scm
Original file line number Diff line number Diff line change
Expand Up @@ -692,7 +692,7 @@
(export gnc:make-number-collector)
(export gnc:make-commodity-collector)
(export gnc:commodity-collector-get-negated)
(export gnc:commodity-collectorlist-get-merged)
(export gnc:commodity-collectorlist-get-merged) ;deprecated
(export gnc-commodity-collector-commodity-count)
(export gnc:account-get-balance-at-date)
(export gnc:account-get-balances-at-dates)
Expand Down
2 changes: 2 additions & 0 deletions gnucash/report/report-system/report-utilities.scm
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,8 @@ construct gnc:make-gnc-monetary and use gnc:monetary->string instead.")
negated))

(define (gnc:commodity-collectorlist-get-merged collectorlist)
(issue-deprecation-warning
"gnc:commodity-collectorlist-get-merged is now deprecated.")
(let ((merged (gnc:make-commodity-collector)))
(for-each (lambda (collector) (merged 'merge collector #f)) collectorlist)
merged))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,7 @@
(collector->list
(gnc:commodity-collector-get-negated coll-A)))

;; deprecated:
(test-equal "gnc:commodity-collectorlist-get-merged"
'(("USD" . 25) ("GBP" . 0))
(collector->list
Expand Down

0 comments on commit 51b6cf6

Please sign in to comment.