Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[rt #69243] slightly simplify XS for i_gsamp()

  • Loading branch information...
commit f37708cec60f62bb84160ace3ac500bb2a8012fc 1 parent 0862f39
@tonycoz authored
Showing with 2 additions and 3 deletions.
  1. +2 −3 Imager.xs
View
5 Imager.xs
@@ -3213,7 +3213,7 @@ i_gsamp(im, l, r, y, channels)
i_img_dim count, i;
PPCODE:
if (l < r) {
- data = mymalloc(sizeof(i_sample_t) * (r-l) * channels.count); /* XXX: memleak? */
+ data = mymalloc(sizeof(i_sample_t) * (r-l) * channels.count);
count = i_gsamp(im, l, r, y, data, channels.channels, channels.count);
if (GIMME_V == G_ARRAY) {
EXTEND(SP, count);
@@ -3228,8 +3228,7 @@ i_gsamp(im, l, r, y, channels)
}
else {
if (GIMME_V != G_ARRAY) {
- EXTEND(SP, 1);
- PUSHs(&PL_sv_undef);
+ XSRETURN_UNDEF;
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.