[Lazarus] g_strconcat() and g_strjoin() - Runtime error 216
Alexey S. Smirnov
betatester at rambler.ru
Thu Aug 27 10:25:43 CEST 2009
I am writing on strange behaviour of g_strconcat() and g_strjoin()
functions from Glib2 Unit.
They are declared as:
function g_strconcat(string1:Pgchar):Pgchar; cdecl; overload; varargs;
external gliblib;
function g_strjoin(separator:Pgchar):Pgchar; cdecl; overload; varargs;
external gliblib;
And are used as:
SomePChar := g_strconcat
(g_strstrip(pLStr[0]),'=',g_strstrip(pLStr[1]),Nil);
Where pLStr is a result of g_strsplit() function. It is declared as
PPChar and is tested to be Not Nil. Also, pLStr[0] and pLStr[1] are
tested to be Not Nil.
Compilation is OK. Execution provides "Runtime error 216".
It seams that there is a problem with parameters passing into
g_strconcat(). It works goot with 2 parameters - like that: g_strconcat
(g_strstrip(pLStr[0]),Nil) and provides Runtime error 216 in all other
cases.
Regards, Alexey.
More information about the Lazarus
mailing list