Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Replaced depricated *-OF function macros with inlined functions.

  • Loading branch information...
commit bef1c021069638e891a6f4402b9d68bd54aa7703 1 parent 79e2383
@jtza8 jtza8 authored committed
Showing with 12 additions and 5 deletions.
  1. +12 −5 utilities.lisp
View
17 utilities.lisp
@@ -68,11 +68,18 @@
(with-bound-image id
(get-integer :image-bits-per-pixel)))
-(defmacro width-of (id) `(image-width ,id))
-(defmacro height-of (id) `(image-height ,id))
-(defmacro pixel-format-of (id) `(image-format ,id))
-(defmacro element-type-of (id) `(image-type ,id))
-(defmacro bytes-per-pixel-of (id) `(image-bytes-per-pixel ,id))
+(defmacro define-replace-fun (deprecated new)
+ `(progn (declaim (inline ,deprecated))
+ (defun ,deprecated (&rest args)
+ (warn ,(format nil "~a has been depricated, use ~a instead"
+ deprecated new))
+ (apply #',new args))))
+
+(define-replace-fun width-of image-width)
+(define-replace-fun height-of image-height)
+(define-replace-fun pixel-format-of image-format)
+(define-replace-fun element-type-of image-type)
+(define-replace-fun bytes-per-pixel-of image-bytes-per-pixel)
(defun copy-palette (dest src)
(bind-image src)
Please sign in to comment.
Something went wrong with that request. Please try again.