Author: yamakenz
Date: Mon Apr 28 15:10:45 2008
New Revision: 5461
Modified:
trunk/scm/deprecated-util.scm
trunk/scm/light-record.scm
trunk/test/test-util.scm
Log:
* scm/light-record.scm
- (define-record): Move to deprecated-util.scm
* scm/deprecated-util.scm
- (define-record): Moved from light-record.scm. No code is modified
* test/test-util.scm
- Update passed revision record
Modified: trunk/scm/deprecated-util.scm
==============================================================================
--- trunk/scm/deprecated-util.scm (original)
+++ trunk/scm/deprecated-util.scm Mon Apr 28 15:10:45 2008
@@ -33,7 +33,7 @@
;; not necessary for uim 1.5. Keeping in mind avoiding the procedures
;; on writing a new code is enough. -- YamaKen 2007-07-11
;;
-;; $ egrep '\((string-list-concat|string-find|truncate-list|list-head|
nconc|string-to-list|symbolconc|nth|nthcdr|copy-list|digit->string|puts|
siod-print|print|feature\?|uim-symbol-value-str)\b' *.scm
+;; $ egrep '\((string-list-concat|string-find|truncate-list|list-head|
nconc|string-to-list|symbolconc|nth|nthcdr|copy-list|digit->string|puts|
siod-print|print|feature\?|uim-symbol-value-str|define-record)\b' *.scm
(require-extension (srfi 1 34))
@@ -109,6 +109,20 @@
(lambda (n)
(and (number? n)
(number->string n))))
+
+;; TODO: Replace with define-vector-record or define-list-record
+;;
+;; See test/test-util.scm to know what define-record does. fld-specs
+;; requires list of list rather than alist to keep extensibility
+;; (e.g. (list-ref spec 2) and so on may be used)
+(define define-record
+ (lambda (rec-name fld-specs)
+ (eval `(define-list-record ,rec-name ',fld-specs)
+ (interaction-environment))
+ (let ((constructor-name (make-record-constructor-name rec-name))
+ (legacy-constructor-name (symbol-append rec-name %HYPHEN-SYM 'new)))
+ (eval `(define ,legacy-constructor-name ,constructor-name)
+ (interaction-environment)))))
;;
;; SIOD compatibility
Modified: trunk/scm/light-record.scm
==============================================================================
--- trunk/scm/light-record.scm (original)
+++ trunk/scm/light-record.scm Mon Apr 28 15:10:45 2008
@@ -227,17 +227,3 @@
`(define-record-generic
,rec-name ,fld-specs
list-copy list-copy list-ref %list-set!)))
-
-;; Backward compatibility
-;;
-;; See test/test-util.scm to know what define-record does. fld-specs
-;; requires list of list rather than alist to keep extensibility
-;; (e.g. (list-ref spec 2) and so on may be used)
-(define define-record
- (lambda (rec-name fld-specs)
- (eval `(define-list-record ,rec-name ',fld-specs)
- (interaction-environment))
- (let ((constructor-name (make-record-constructor-name rec-name))
- (legacy-constructor-name (symbol-append rec-name %HYPHEN-SYM 'new)))
- (eval `(define ,legacy-constructor-name ,constructor-name)
- (interaction-environment)))))
Modified: trunk/test/test-util.scm
==============================================================================
--- trunk/test/test-util.scm (original)
+++ trunk/test/test-util.scm Mon Apr 28 15:10:45 2008
@@ -29,7 +29,7 @@
;;; SUCH DAMAGE.
;;;;
-;; These tests are passed at revision 5460 (new repository)
+;; These tests are passed at revision 5461 (new repository)
(use test.unit)