projects
/
imager.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1592522
)
[rt #69243] simplify XS for i_findcolor()
author
Tony Cook
<tony@develop-help.com>
Fri, 24 May 2013 13:00:04 +0000
(23:00 +1000)
committer
Tony Cook
<tony@develop-help.com>
Fri, 24 May 2013 13:00:04 +0000
(23:00 +1000)
Imager.xs
patch
|
blob
|
blame
|
history
diff --git
a/Imager.xs
b/Imager.xs
index 758f3a1256fc322e5658019ef3286055478af88b..38a3b393aef85d980d12e320b6aac093712f0576 100644
(file)
--- a/
Imager.xs
+++ b/
Imager.xs
@@
-3178,18
+3178,13
@@
undef_neg_int
i_maxcolors(im)
Imager::ImgRaw im
-SV *
+i_palidx
i_findcolor(im, color)
Imager::ImgRaw im
Imager::Color color
- PREINIT:
- i_palidx index;
CODE:
- if (i_findcolor(im, color, &index)) {
- RETVAL = newSViv(index);
- }
- else {
- RETVAL = &PL_sv_undef;
+ if (!i_findcolor(im, color, &RETVAL)) {
+ XSRETURN_UNDEF;
}
OUTPUT:
RETVAL