branch: externals/heap
commit 04de075a67c4c67de000633904720e2693295fc3
Author: Toby S. Cubitt <[email protected]>
Commit: Toby S. Cubitt <[email protected]>

    Tidy up unnecessary macros by making them into defsubst or defun.
---
 heap.el | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/heap.el b/heap.el
index 928e604..c526e9a 100644
--- a/heap.el
+++ b/heap.el
@@ -102,11 +102,11 @@
              j (+ 3 k)))))))
 
 
-(defmacro heap--vswap (vect i j)   ; INTERNAL USE ONLY
+(defsubst heap--vswap (vect i j)   ; INTERNAL USE ONLY
   ;; Swap elements I and J of vector VECT.
-  `(let ((tmp (aref ,vect ,i)))
-     (aset ,vect ,i (aref ,vect ,j))
-     (aset ,vect ,j tmp) ,vect))
+  (let ((tmp (aref vect i)))
+    (aset vect i (aref vect j))
+    (aset vect j tmp) vect))
 
 
 (defun heap--sift-up (heap n)   ; INTERNAL USE ONLY

Reply via email to