On 9-9-2015 11:11, Alex Peshkoff wrote:
> On 09/09/2015 12:03 PM, Mark Rotteveel wrote:
>> On 7-9-2015 16:39, Adriano dos Santos Fernandes wrote:
>>> Hi!
>>>
>>> Idea behind cloop is to have descriptive idl file so that bindings for
>>> different types of languages would be generated automatically.
>>>
>>> Currently the idl grammar is simple and effective for C, C++ and Pascal.
>>>
>>> But we use intptr type for errors codes or strings.
>>>
>>> No matter how we improve the cloop grammar, one could not read/write
>>> this in Java.
>>>
>>> I think we should redesign the Status interface so one could read/write
>>> them in non native languages.
>>>
>>> BTW, I wonder, how could the Jaybird JNA interpret (read numbers and
>>> strings) status vectors? Or just it could not, always leaving the job
>>> for fb_interpret?
>> JNA can use pointers, and Jaybird does (with the old API). I don't use
>> fb_interpret at all.
>>
>> See for example (as part of status vector processing):
>> https://github.com/FirebirdSQL/jaybird/blob/master/src/jna-client/org/firebirdsql/gds/ng/jna/JnaConnection.java#L110
>>
>> The use of pointers is annoying, but not a big problem.
>>
>> I don't really understand why you'd use a pointer for an error code
>> though, that seems to be an unnecessary indirection.
>>
>
> intptr  is not a pointer - it's an integer of a minimum size in which
> pointers fit.

Ah, so the current type of ISC_STATUS, right? Well, that works as shown 
in the link above.

Its JNA definition is 
https://github.com/FirebirdSQL/jaybird/blob/master/src/jna-client/org/firebirdsql/jna/fbclient/ISC_STATUS.java

Mark
-- 
Mark Rotteveel

------------------------------------------------------------------------------
Monitor Your Dynamic Infrastructure at Any Scale With Datadog!
Get real-time metrics from all of your servers, apps and tools
in one place.
SourceForge users - Click here to start your Free Trial of Datadog now!
http://pubads.g.doubleclick.net/gampad/clk?id=241902991&iu=/4140
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to