[INTERPRETER]

* OPT: A little optimization in Split().

[GB.CAIRO]
* BUG: Cairo.Path() now creates a text path and does not draw anything, 
  like other drawing methods.


git-svn-id: svn://localhost/gambas/trunk@3008 867c0c6c-44f3-4631-809d-bfa615b0a4ec
This commit is contained in:
Benoît Minisini 2010-06-16 10:25:21 +00:00
parent be6bde730d
commit e1a7b5efcb
3 changed files with 36 additions and 13 deletions

View file

@ -979,7 +979,7 @@ BEGIN_METHOD(Cairo_Text, GB_STRING text)
CHECK_CNT();
cairo_show_text(CNT, GB.ToZeroString(ARG(text)));
cairo_text_path(CNT, GB.ToZeroString(ARG(text)));
END_METHOD

View file

@ -27,8 +27,11 @@
static void free_image(GB_IMG *img, void *image)
{
imlib_context_set_image((Imlib_Image)image);
imlib_free_image();
if (image)
{
imlib_context_set_image((Imlib_Image)image);
imlib_free_image();
}
}
static void *temp_image(GB_IMG *img)

View file

@ -1668,20 +1668,40 @@ void CARRAY_split(CARRAY *_object, const char *str, int lstr, const char *sep, c
if (esc == NULL || *esc == 0)
{
i = lstr;
while (i--)
if (!lsep)
{
c = *str;
char csep = sep[0];
if (c == *sep || (lsep && index(&sep[1], c)))
add_entry();
else
while (i--)
{
//add_char(str);
if (!_lptr) _ptr = str;
_lptr++;
if (*str == csep)
add_entry();
else
{
//add_char(str);
if (!_lptr) _ptr = str;
_lptr++;
}
str++;
}
}
else
{
while (i--)
{
if (index(sep, *str))
add_entry();
else
{
//add_char(str);
if (!_lptr) _ptr = str;
_lptr++;
}
str++;
}
str++;
}
add_entry();