[Openmcl-devel] Getting a double-float from ObjC

Gary Byers gb at clozure.com
Sat Jun 19 13:58:43 UTC 2004



On Sat, 19 Jun 2004, Sebastian Nozzi wrote:

> Hi Gary,
>
> There might be a similar problem here:
> (or doesn't OpenMCL support unsigned long longs?)
>
> ? (setf num *)
> #<NS-CF-NUMBER 6148 (#x1BAF70)>
>
> ? (send num 'unsigned-long-long-value)
>  > Error in process Listener(5): The message "unsignedLongLongValue"
> must be sent using SEND/STRET
>
>  > While executing: BUILD-CALL
>
> (OpenMCL 0.14.2-p1)

The version of REQUIRES-STRET-P that I mailed out in response to your
earlier bug report (and that's now in 0.14 CVS) seems to recognize
that :UNSIGNED-DOUBLEWORDs aren't returned in structures:

(defun requires-stret-p (rspec)
  (when (member rspec '(:DOUBLE-FLOAT :UNSIGNED-DOUBLEWORD :SIGNED-DOUBLEWORD)
		:test #'eq)
    (return-from requires-stret-p nil))
  (setq rspec (fudge-objc-type rspec))
  (if (numberp rspec)
    (> rspec 1)
    (> (ensure-foreign-type-bits (parse-foreign-type rspec)) 32)))

What version of this function is failing ?  What happens if you

? (trace ccl::requires-stret-p)

and try to compile:

? (send num 'unsigned-long-long-value)

?



More information about the Openmcl-devel mailing list