X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=tests%2Fgettime.cl;h=69b2f07969dae55d025884f8fd1ae1f0b6af49bf;hb=f73eb94e15649aba5fcfbe3a900aa72f31f46a96;hp=12012565ffc9f5d827ad09da169021d934c9edbe;hpb=ca7e9a2299773cfbc927d71e6289549601438b24;p=uffi.git diff --git a/tests/gettime.cl b/tests/gettime.cl index 1201256..69b2f07 100644 --- a/tests/gettime.cl +++ b/tests/gettime.cl @@ -7,7 +7,7 @@ ;;;; Programmer: Kevin M. Rosenberg ;;;; Date Started: Feb 2002 ;;;; -;;;; $Id: gettime.cl,v 1.6 2002/03/14 21:03:12 kevin Exp $ +;;;; $Id: gettime.cl,v 1.7 2002/03/23 16:32:39 kevin Exp $ ;;;; ;;;; This file, part of UFFI, is Copyright (c) 2002 by Kevin M. Rosenberg ;;;; @@ -44,8 +44,8 @@ (defun gettime () "Returns the local time" - (let* ((time (uffi:allocate-foreign-object time-t))) - (declare (type time-t time)) + (uffi:with-foreign-object (time 'time-t) +;; (declare (type time-t time)) (c-time time) (let ((tm-ptr (the tm-pointer (c-localtime time)))) (declare (type tm-pointer tm-ptr)) @@ -57,9 +57,7 @@ (uffi:get-slot-value tm-ptr 'tm 'min) (uffi:get-slot-value tm-ptr 'tm 'sec) ))) - (uffi:free-foreign-object time) - time-string)) - )) + time-string))))