[elephant-cvs] CVS elephant/src/memutil

ieslick ieslick at common-lisp.net
Mon Jun 19 01:31:59 UTC 2006


Update of /project/elephant/cvsroot/elephant/src/memutil
In directory clnet:/tmp/cvs-serv673

Modified Files:
	memutil.lisp 
Log Message:

Complete allegro encoding efficiency patch.



--- /project/elephant/cvsroot/elephant/src/memutil/memutil.lisp	2006/04/26 21:41:24	1.6
+++ /project/elephant/cvsroot/elephant/src/memutil/memutil.lisp	2006/06/19 01:31:59	1.7
@@ -323,8 +323,8 @@
   #+(and allegro ics)
   ;; old: `(let ((l (length ,s))) (+ l l))
   `(etypecase ,s
-     (base-string (excl:native-string-sizeof ,s :external-format :unicode))
-		  ;; fast 0.6.1  (length ,s)
+     (base-string ;; (excl:native-string-sizeof ,s :external-format :unicode))
+		  (length ,s)) ;; fast 0.6.1  
      (string (excl:native-string-sizeof ,s :external-format :unicode)))
   #+(or (and sbcl sb-unicode) lispworks)
   `(etypecase ,s 
@@ -574,8 +574,12 @@
       #-allegro
       (copy-str-to-buf buf size s 0 str-bytes)
       #+allegro
-      (excl:string-to-native s :address (offset-char-pointer buf size) :external-format :unicode)
-      ;; v0.6.0 (copy-str-to-buf buf size s 0 str-bytes)
+      (etypecase s
+	(base-string 
+	 (copy-str-to-buf buf size s 0 str-bytes)) ;; v0.6.0 
+	(string
+	 (excl:string-to-native s :address (offset-char-pointer buf size) :external-format :unicode)
+	 ))
       (setf size needed)
       nil)))
 




More information about the Elephant-cvs mailing list