[Openmcl-cvs-notifications] r8509 - /trunk/source/level-1/l1-utils.lisp

gb at clozure.com gb at clozure.com
Mon Feb 18 03:15:30 EST 2008


Author: gb
Date: Mon Feb 18 03:15:30 2008
New Revision: 8509

Log:
%SET-CSTRING defined in terms of %CSTR-POINTER.

Modified:
    trunk/source/level-1/l1-utils.lisp

Modified: trunk/source/level-1/l1-utils.lisp
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- trunk/source/level-1/l1-utils.lisp (original)
+++ trunk/source/level-1/l1-utils.lisp Mon Feb 18 03:15:30 2008
@@ -1032,16 +1032,8 @@
 =

 =

 (defun %set-cstring (ptr string)
-  (let* ((len (length string)))
-    (cond ((typep string 'simple-string)
-           (%copy-ivector-to-ptr string 0 ptr 0 len))
-          ((typep string 'string)
-                  (multiple-value-bind (data offset)
-                      (array-data-and-offset string)
-                    (%copy-ivector-to-ptr data offset ptr 0 len)))
-          (t (report-bad-arg string 'string)))
-    (setf (%get-byte ptr len) 0)
-    string))
+  (%cstr-pointer string ptr)
+  string)
 =

 (defsetf %get-cstring %set-cstring)
 =




More information about the Openmcl-cvs-notifications mailing list