[uim-commit] r961 - branches/composer/scm

yamaken at freedesktop.org yamaken at freedesktop.org
Sun Jul 10 04:53:27 EST 2005


Author: yamaken
Date: 2005-07-09 11:53:23 -0700 (Sat, 09 Jul 2005)
New Revision: 961

Modified:
   branches/composer/scm/ustr.scm
Log:
* scm/ustr.scm
  - Replace ustr record with single cons to get efficient
  - (ustr-rec-spec, record ustr, ustr-new-internal): Removed
  - (ustr-former, ustr-set-former!, ustr-latter, ustr-set-latter!):
    New procedure
  - (ustr-new): Follow the changes


Modified: branches/composer/scm/ustr.scm
===================================================================
--- branches/composer/scm/ustr.scm	2005-07-09 18:49:16 UTC (rev 960)
+++ branches/composer/scm/ustr.scm	2005-07-09 18:53:23 UTC (rev 961)
@@ -46,19 +46,24 @@
 ;; private accessors for use in ustr.scm. Users of ustr should use
 ;; ustr-former-seq, ustr-set-former-seq!, ustr-latter-seq and
 ;; ustr-set-latter-seq! instead.
-(define ustr-rec-spec
-  '((former ())  ;; reversed order
-    (latter ())))
-(define-record 'ustr ustr-rec-spec)
-(define ustr-new-internal ustr-new)
 
+;;(define ustr-rec-spec
+;;  '((former ())  ;; reversed order
+;;    (latter ())))
+;;(define-record 'ustr ustr-rec-spec)
+;;(define ustr-new-internal ustr-new)
+(define ustr-former car)
+(define ustr-set-former! set-car!)
+(define ustr-latter cdr)
+(define ustr-set-latter! set-cdr!)
+
 (define ustr-new
   (lambda args
-    (let* ((former-seq (and (not (null? args))
-			    (car args)))
-	   (latter-seq (and (not (null? (cdr args)))
-			    (cadr args)))
-	   (ustr (ustr-new-internal)))
+    (let ((former-seq (and (not (null? args))
+			   (car args)))
+	  (latter-seq (and (not (null? (cdr args)))
+			   (cadr args)))
+	  (ustr (cons () ())))
       (and former-seq
 	   (ustr-set-former-seq! ustr former-seq))
       (and latter-seq



More information about the uim-commit mailing list