gnucash maint: Multiple changes pushed

Christopher Lam clam at code.gnucash.org
Sun Jul 12 11:10:26 EDT 2020


Updated	 via  https://github.com/Gnucash/gnucash/commit/00bbd326 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/b5829ce3 (commit)
	from  https://github.com/Gnucash/gnucash/commit/428c8c50 (commit)



commit 00bbd32677fba00ae0e709dce0bb35e06f90305c
Author: Christopher Lam <christopher.lck at gmail.com>
Date:   Sun Jul 12 22:10:08 2020 +0800

    [html-html/pie/bar/linechart] use symbol for make-record-type
    
    strings in make-record-type are deprecated in guile-3. these modules
    are deprecated and don't need to be converted to srfi-9.

diff --git a/gnucash/report/html-barchart.scm b/gnucash/report/html-barchart.scm
index 23967a741..76e2a10ab 100644
--- a/gnucash/report/html-barchart.scm
+++ b/gnucash/report/html-barchart.scm
@@ -22,7 +22,7 @@
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
 (define <html-barchart>
-  (make-record-type "<html-barchart>"
+  (make-record-type '<html-barchart>
                     '(width 
                       height 
                       title 
diff --git a/gnucash/report/html-linechart.scm b/gnucash/report/html-linechart.scm
index cd79048c0..faf3ec2de 100644
--- a/gnucash/report/html-linechart.scm
+++ b/gnucash/report/html-linechart.scm
@@ -25,7 +25,7 @@
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
 (define <html-linechart>
-  (make-record-type "<html-linechart>"
+  (make-record-type '<html-linechart>
                     '(width
                       height
                       title
diff --git a/gnucash/report/html-piechart.scm b/gnucash/report/html-piechart.scm
index 3bdc7fd21..2bc56d1dc 100644
--- a/gnucash/report/html-piechart.scm
+++ b/gnucash/report/html-piechart.scm
@@ -22,7 +22,7 @@
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
 (define <html-piechart>
-  (make-record-type "<html-piechart>"
+  (make-record-type '<html-piechart>
                     '(width
                       height
                       title
diff --git a/gnucash/report/html-scatter.scm b/gnucash/report/html-scatter.scm
index f1532d797..77ebf5aa8 100644
--- a/gnucash/report/html-scatter.scm
+++ b/gnucash/report/html-scatter.scm
@@ -25,7 +25,7 @@
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
 (define <html-scatter>
-  (make-record-type "<html-scatter>"
+  (make-record-type '<html-scatter>
                     '(width
                       height
                       title

commit b5829ce33ad21d9d12e3ccdd7851fc67437fcbfb
Author: Christopher Lam <christopher.lck at gmail.com>
Date:   Sun Jul 12 22:09:48 2020 +0800

    [aging] use srfi-9 records for :company-info

diff --git a/gnucash/report/reports/aging.scm b/gnucash/report/reports/aging.scm
index 16a1824bb..ca9f5f31e 100644
--- a/gnucash/report/reports/aging.scm
+++ b/gnucash/report/reports/aging.scm
@@ -31,6 +31,7 @@
 (use-modules (gnucash core-utils))
 (use-modules (gnucash app-utils))
 (use-modules (gnucash report))
+(use-modules (srfi srfi-9))
 
 (define optname-to-date (N_ "To"))
 (define optname-sort-by (N_ "Sort By"))
@@ -67,42 +68,20 @@
 ;; if any.  Any bills get taken out of the overpayment before
 ;; incurring debt.
 
-(define company-info (make-record-type "ComanyInfo" 
-				       '(currency
-					 bucket-vector
-					 overpayment
-					 owner-obj)))
+(define-record-type :company-info
+  (make-company-private currency bucket overpayment owner-obj)
+  company-info?
+  (currency company-get-currency)
+  (bucket company-get-buckets company-set-buckets)
+  (overpayment company-get-overpayment company-set-overpayment)
+  (owner-obj company-get-owner-obj company-set-owner-obj!))
 
 (define num-buckets 5)
 (define (new-bucket-vector)
   (make-vector num-buckets (gnc-numeric-zero)))
 
-(define make-company-private
-  (record-constructor company-info '(currency bucket-vector overpayment owner-obj)))
-
 (define (make-company currency owner-obj)
-  (make-company-private currency (new-bucket-vector) (gnc-numeric-zero) owner-obj))
-
-(define company-get-currency
-  (record-accessor company-info 'currency))
-
-(define company-get-owner-obj
-  (record-accessor company-info 'owner-obj))
-
-(define company-set-owner-obj!
-  (record-modifier company-info 'owner-obj))
-
-(define company-get-buckets
-  (record-accessor company-info 'bucket-vector))
-
-(define company-set-buckets
-  (record-modifier company-info 'bucket-vector))
-
-(define company-get-overpayment
-  (record-accessor company-info 'overpayment))
-
-(define company-set-overpayment
-  (record-modifier company-info 'overpayment))
+  (make-company-private currency (new-bucket-vector) 0 owner-obj))
 
 ;; Put an invoice in the appropriate bucket
 



Summary of changes:
 gnucash/report/html-barchart.scm  |  2 +-
 gnucash/report/html-linechart.scm |  2 +-
 gnucash/report/html-piechart.scm  |  2 +-
 gnucash/report/html-scatter.scm   |  2 +-
 gnucash/report/reports/aging.scm  | 39 +++++++++------------------------------
 5 files changed, 13 insertions(+), 34 deletions(-)



More information about the gnucash-changes mailing list