r9457: Reworked CLSQL file structure.
[clsql.git] / sql / kmr-mop.lisp
index bcd893acfbecc6fa9662c3b537af9efe820ec3d7..8fccf57778e306a4a9ce6b3b7801dfd49c026d3e 100644 (file)
   (declare (ignore metaclass slot-name))
   )
 
+(eval-when (:compile-toplevel :load-toplevel :execute)
+  (defclass %slot-order-test-class ()
+    ((a)
+     (b)))
+  (finalize-inheritance (find-class '%slot-order-test-class))
+  (let ((slots (class-slots (find-class '%slot-order-test-class))))
+    (ecase (slot-definition-name (first slots))
+      (a)
+      (b (pushnew :mop-slot-order-reversed cl:*features*)))))
+       
+(defun ordered-class-slots (class)
+  #+mop-slot-order-reversed (reverse (class-slots class))
+  #-mop-slot-order-reversed (class-slots class))
+
+;; Lispworks has symbol for slot rather than the slot instance
+(defun %svuc-slot-name (slot)
+  #+lispworks slot
+  #-lispworks (slot-definition-name slot))
+
+(defun %svuc-slot-object (slot class)
+  (declare (ignorable class))
+  #+lispworks (clos:find-slot-definition slot class)
+  #-lispworks slot)
+