Revert "[standard-reports] modernise to srfi-9 records"

This reverts commit
123033e5ea. Unfortunately srfi-9 records
don't travel well outside modules, so, will fail on master.
This commit is contained in:
Christopher Lam 2019-08-27 21:50:32 +08:00
parent d963ca0d3a
commit f4a1b2fdf2

View File

@ -25,7 +25,6 @@
(define-module (gnucash report standard-reports))
(use-modules (srfi srfi-9))
(use-modules (srfi srfi-13))
(use-modules (gnucash utilities))
(use-modules (gnucash core-utils))
@ -40,15 +39,26 @@
;; or without split. If no function is found, then run the 'default'
;; function
(define-record-type :acct-type-info
(make-acct-type-private split non-split)
acct-type-info?
(split get-split set-split)
(non-split get-non-split set-non-split))
(define acct-type-info (make-record-type "AcctTypeInfo" '(split non-split)))
(define make-acct-type-private
(record-constructor acct-type-info '(split non-split)))
(define (make-acct-type)
(make-acct-type-private #f #f))
(define get-split
(record-accessor acct-type-info 'split))
(define set-split
(record-modifier acct-type-info 'split))
(define get-non-split
(record-accessor acct-type-info 'non-split))
(define set-non-split
(record-modifier acct-type-info 'non-split))
(define (gnc:register-report-hook acct-type split? create-fcn)
(let ((type-info (hash-ref gnc:*register-report-hash* acct-type (make-acct-type))))
(if split?