+ don't call XftValueDestroy() in XftPatternAdd/Get() --- this patch avoids tons of "already freed" messages

+ XftFontMatch(): return false if no font matches, not unspecific
+ scx_xftfontset_pattern_ref(): fixed wrong index
This commit is contained in:
eknauel 2004-04-26 07:25:39 +00:00
parent afb80004d6
commit 0617270567
1 changed files with 3 additions and 4 deletions

View File

@ -101,7 +101,6 @@ s48_value scx_XftPatternGet(s48_value sxp, s48_value sobj, s48_value sid)
rl = s48_list_2(s48_enter_integer(rc), rv);
S48_GC_UNPROTECT();
XftValueDestroy(v);
return rl;
}
@ -159,9 +158,9 @@ s48_value scx_XftFontMatch(s48_value sdpy, s48_value sscreenno, s48_value sxp)
S48_GC_UNPROTECT();
if (p == NULL)
return s48_list_2(S48_FALSE, S48_UNSPECIFIC);
return s48_list_2(S48_FALSE, S48_FALSE);
else
return s48_list_2(s48_enter_integer(r), scx_enter_xftpattern(p));
return s48_list_2(s48_enter_fixnum(r), scx_enter_xftpattern(p));
}
s48_value scx_XftFontOpenPattern(s48_value sdpy, s48_value sxp)
@ -548,7 +547,7 @@ s48_value scx_xftfontset_pattern_ref(s48_value sxfs, s48_value index)
xfs = scx_extract_xftfontset(sxfs);
S48_GC_UNPROTECT();
if ((i >= 0) && (i <= xfs->nfont))
if ((i >= 0) && (i < xfs->nfont))
return scx_enter_xftpattern(xfs->fonts[i]);
else
return S48_FALSE;