Skip to content

Commit

Permalink
Revert "[standard-reports] modernise to srfi-9 records"
Browse files Browse the repository at this point in the history
This reverts commit
123033e. Unfortunately srfi-9 records
don't travel well outside modules, so, will fail on master.
  • Loading branch information
christopherlam committed Aug 27, 2019
1 parent d963ca0 commit f4a1b2f
Showing 1 changed file with 16 additions and 6 deletions.
22 changes: 16 additions & 6 deletions gnucash/report/standard-reports/standard-reports.scm
Expand Up @@ -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))
Expand All @@ -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?
Expand Down

0 comments on commit f4a1b2f

Please sign in to comment.