[movitz-cvs] CVS movitz/losp/muerte
ffjeld
ffjeld at common-lisp.net
Fri Mar 16 19:49:24 UTC 2007
Update of /project/movitz/cvsroot/movitz/losp/muerte
In directory clnet:/tmp/cvs-serv12162
Modified Files:
ratios.lisp
Log Message:
Factor out %make-ratio from make-ratio.
--- /project/movitz/cvsroot/movitz/losp/muerte/ratios.lisp 2007/03/16 17:41:11 1.8
+++ /project/movitz/cvsroot/movitz/losp/muerte/ratios.lisp 2007/03/16 19:49:24 1.9
@@ -10,7 +10,7 @@
;;;; Author: Frode Vatvedt Fjeld <frodef at acm.org>
;;;; Created at: Tue Jul 20 00:39:59 2004
;;;;
-;;;; $Id: ratios.lisp,v 1.8 2007/03/16 17:41:11 ffjeld Exp $
+;;;; $Id: ratios.lisp,v 1.9 2007/03/16 19:49:24 ffjeld Exp $
;;;;
;;;;------------------------------------------------------------------
@@ -21,9 +21,7 @@
(in-package muerte)
-(defun make-ratio (numerator denominator)
- (check-type numerator integer)
- (check-type denominator (integer 1 *))
+(defun %make-ratio (numerator denominator)
(macrolet
((do-it ()
`(with-allocation-assembly (4 :fixed-size-p t
@@ -36,6 +34,11 @@
(:movl :edx (:eax (:offset movitz-ratio denominator))))))
(do-it)))
+(defun make-ratio (numerator denominator)
+ (check-type numerator integer)
+ (check-type denominator (integer 1 *))
+ (%make-ratio numerator denominator))
+
(defun ratio-p (x)
(typep x 'ratio))
More information about the Movitz-cvs
mailing list