Subject | Re: [Firebird-Architect] Re: C API Upgrade? |
---|---|
Author | Ivan Prenosil |
Post date | 2008-02-01T11:34:24Z |
>> > char *isc_dsql_get_name(XSQLDA *xsqlda, unsigned short colno)It looks much better.
>>
>> Do you mean name of the column ? It is stored in xsqlda, just read it.
>> In Delphi it is just
>>
>> Copy(xsqlda.sqlvar[col].sqlname, 1, xsqlda.sqlvar[col].sqlname_length)
>
> But this is more clear and omits dependence from XSQLDA internals:
>
> name = isc_dsql_get_name(xsqlda, col);
But, what would such function exactly do ? Allocate the memory and copy
the name into it ? It is perhaps good for C, but useless for Delphi where
I would need to copy it again into string and free the memory.
And do you think language specific helper functions belong to general API ?
Would not short include file with simple macro do the same for C programmers ?
(and I agree that such official include would be nice)
Ivan