projects
/
mit-scheme.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7aa24ef
)
glib: Add guarantee-color.
author
Matt Birkholz
<matt@birchwood-abbey.net>
Mon, 12 Mar 2018 16:12:48 +0000
(09:12 -0700)
committer
Matt Birkholz
<matt@birchwood-abbey.net>
Mon, 12 Mar 2018 16:12:48 +0000
(09:12 -0700)
src/glib/glib.scm
patch
|
blob
|
history
diff --git
a/src/glib/glib.scm
b/src/glib/glib.scm
index 252fa05800eb280b52fd560299bad25aa0043a69..1fbdd0b9f767a44874ac4b5fd8a34846d2d51d79 100644
(file)
--- a/
src/glib/glib.scm
+++ b/
src/glib/glib.scm
@@
-114,6
+114,11
@@
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
(set-color-blue! color blue)
(set-color-alpha! color alpha)
color))
+
+(define (guarantee-color object operator)
+ (if (color? object)
+ object
+ (error:wrong-type-argument object "a color" operator)))
\f
;;; GLib Mutex