[PATCH 01/13] remove spurious (require 'hash-table) instances

Andy Wingo wingo at pobox.com
Mon Mar 29 13:07:25 EDT 2010


There is nothing that the slib hash-table module provides that was used
in any of these files; they all used Guile's stock hash tables.

Additionally there was a typo in c-interface.scm.
---
 src/app-utils/c-interface.scm                    |    4 +---
 src/app-utils/prefs.scm                          |    2 --
 src/business/business-reports/aging.scm          |    2 --
 src/business/business-reports/easy-invoice.scm   |    2 --
 src/business/business-reports/fancy-invoice.scm  |    2 --
 src/business/business-reports/invoice.scm        |    2 --
 src/report/report-system/report-system.scm       |    2 --
 src/report/standard-reports/standard-reports.scm |    2 --
 8 files changed, 1 insertions(+), 17 deletions(-)

diff --git a/src/app-utils/c-interface.scm b/src/app-utils/c-interface.scm
index 9827d21..b509e5c 100644
--- a/src/app-utils/c-interface.scm
+++ b/src/app-utils/c-interface.scm
@@ -18,8 +18,6 @@
 (use-modules (ice-9 slib))
 (use-modules (ice-9 syncase))
 
-(require 'hash-table)
-
 (define (gnc:error->string tag args)
   (define (write-error port)
     (if (and (list? args) (not (null? args)))
@@ -57,7 +55,7 @@
   (define string-hash (make-hash-table 23))
 
   (define (lookup key)
-    (_ (hash-ref string-hash key)))
+    (hash-ref string-hash key))
 
   (define (store key string)
     (hash-set! string-hash key string))
diff --git a/src/app-utils/prefs.scm b/src/app-utils/prefs.scm
index d460646..a0ee256 100644
--- a/src/app-utils/prefs.scm
+++ b/src/app-utils/prefs.scm
@@ -17,8 +17,6 @@
 ;; 51 Franklin Street, Fifth Floor    Fax:    +1-617-542-2652
 ;; Boston, MA  02110-1301,  USA       gnu at gnu.org
 
-(require 'hash-table)
-
 ;; (define gnc:*double-entry-restriction*
 ;;   (gnc:make-config-var
 ;;    "Determines how the splits in a transaction will be balanced. 
diff --git a/src/business/business-reports/aging.scm b/src/business/business-reports/aging.scm
index 1bab762..bd47f29 100644
--- a/src/business/business-reports/aging.scm
+++ b/src/business/business-reports/aging.scm
@@ -30,8 +30,6 @@
 (use-modules (gnucash main))
 (use-modules (gnucash gnc-module))
 
-(require 'hash-table)
-
 (gnc:module-load "gnucash/report/report-system" 0)
 (gnc:module-load "gnucash/business-core" 0)
 
diff --git a/src/business/business-reports/easy-invoice.scm b/src/business/business-reports/easy-invoice.scm
index 08751b4..7848f1b 100644
--- a/src/business/business-reports/easy-invoice.scm
+++ b/src/business/business-reports/easy-invoice.scm
@@ -34,8 +34,6 @@
 (use-modules (ice-9 slib))
 (use-modules (gnucash gnc-module))
 
-(require 'hash-table)
-
 (gnc:module-load "gnucash/report/report-system" 0)
 (gnc:module-load "gnucash/business-utils" 0)
 
diff --git a/src/business/business-reports/fancy-invoice.scm b/src/business/business-reports/fancy-invoice.scm
index 16d38f6..215a0b2 100644
--- a/src/business/business-reports/fancy-invoice.scm
+++ b/src/business/business-reports/fancy-invoice.scm
@@ -52,8 +52,6 @@
 (use-modules (ice-9 slib))
 (use-modules (gnucash gnc-module))
 
-(require 'hash-table)
-
 (gnc:module-load "gnucash/report/report-system" 0)
 (gnc:module-load "gnucash/business-utils" 0)
 
diff --git a/src/business/business-reports/invoice.scm b/src/business/business-reports/invoice.scm
index 81044a0..a72f3cf 100644
--- a/src/business/business-reports/invoice.scm
+++ b/src/business/business-reports/invoice.scm
@@ -28,8 +28,6 @@
 (use-modules (ice-9 slib))
 (use-modules (gnucash gnc-module))
 
-(require 'hash-table)
-
 (gnc:module-load "gnucash/report/report-system" 0)
 (gnc:module-load "gnucash/business-utils" 0)
 
diff --git a/src/report/report-system/report-system.scm b/src/report/report-system/report-system.scm
index bed46f5..d3cf410 100644
--- a/src/report/report-system/report-system.scm
+++ b/src/report/report-system/report-system.scm
@@ -13,8 +13,6 @@
 (use-modules (srfi srfi-19))
 (use-modules (gnucash gnc-module))
 
-(require 'hash-table)
-
 (gnc:module-load "gnucash/engine" 0)
 (gnc:module-load "gnucash/app-utils" 0)
 (gnc:module-load "gnucash/html" 0)
diff --git a/src/report/standard-reports/standard-reports.scm b/src/report/standard-reports/standard-reports.scm
index 60156a0..43eda4b 100644
--- a/src/report/standard-reports/standard-reports.scm
+++ b/src/report/standard-reports/standard-reports.scm
@@ -13,8 +13,6 @@
 (export gnc:register-report-create)
 (export gnc:register-report-hook)
 
-(require 'hash-table)
-
 (define gnc:*register-report-hash* (make-hash-table 23))
 
 ;; Keep a hash-table of records, keyed off the account type.  Each
-- 
1.6.2.5


--=-=-=
Content-Type: text/x-patch
Content-Disposition: attachment;
 filename=0002-pull-in-printf-from-slib-change-all-code-to-use-it.patch



More information about the gnucash-devel mailing list