Revision: 44197 http://brlcad.svn.sourceforge.net/brlcad/?rev=44197&view=rev Author: erikgreenwald Date: 2011-04-04 21:05:45 +0000 (Mon, 04 Apr 2011)
Log Message: ----------- Fix magic sizes (this may be a bug in librt?). Fix up the rt-open func. Modified Paths: -------------- geomcore/trunk/src/interfaces/cl/brlcad.lisp Modified: geomcore/trunk/src/interfaces/cl/brlcad.lisp =================================================================== --- geomcore/trunk/src/interfaces/cl/brlcad.lisp 2011-04-04 20:37:04 UTC (rev 44196) +++ geomcore/trunk/src/interfaces/cl/brlcad.lisp 2011-04-04 21:05:45 UTC (rev 44197) @@ -20,7 +20,7 @@ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (defcstruct xray "Ray" - (magic :uint32) + (magic :unsigned-long) (index :int) (r_pt :double :count 3) (r_dir :double :count 3) @@ -28,7 +28,7 @@ (r_man :double)) (defcstruct application "Application structure" - (a_magic :uint32) + (a_magic :unsigned-long) ;;; THESE ELEMENTS ARE MANDATORY (a_ray xray) ; Actual ray to be shot @@ -106,7 +106,7 @@ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (defun rt-open (filename regions) - (let ((a (foreign-alloc (foreign-type-size 'application)))) - (setf (application-a_rt_i a) (rt-dirbuild filename "RT" 0)) - (loop for region in regions do (rt-gettree (application-a_rt_i a) region)) + (with-foreign-object (a 'application) + (setf (foreign-slot-value a 'application 'a_rt_i) (rt-dirbuild filename "RT" 0)) + (loop for region in regions do (rt-gettree (foreign-slot-value a 'application 'a_rt_i) region)) a)) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------------ Xperia(TM) PLAY It's a major breakthrough. An authentic gaming smartphone on the nation's most reliable network. And it wants your games. http://p.sf.net/sfu/verizon-sfdev _______________________________________________ BRL-CAD Source Commits mailing list brlcad-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/brlcad-commits