[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] [PATCH] Domain object is converted



On Tue, Jul 28, 2009 at 11:07:36AM -0400, Bryan Kearney wrote:
>>> +++ b/src/org/libvirt/jna/virDomainBlockStats.java
>>> @@ -0,0 +1,12 @@
>>> +package org.libvirt.jna;
>>> +
>>> +import com.sun.jna.Structure;
>>> +
>>> +public class virDomainBlockStats extends Structure
>>> +{
>>> +    public long rd_req ;
>>> +    public long rd_bytes ;    +    public long wr_req ;
>>> +    public long wr_bytes ;    +    public long errs ;    +}
>>
>>   Hum ... in C we have
>>
>> struct _virDomainBlockStats {
>>   long long rd_req; /* number of read requests */
>>   long long rd_bytes; /* number of read bytes */
>>   long long wr_req; /* number of write requests */
>>   long long wr_bytes; /* number of written bytes */
>>   long long errs;   /* In Xen this returns the mysterious 'oo_req'. */
>> };
>>
>>   will java long really be able to match C long long scope ?
>
>
> Per the JNA mappings, long long equals java long... so this is correct.  
> I did add an explicit comment on each line which uses a long in java  
> instead of a NativeLong.

  Okay, excellent, I was worried at first :-)

Daniel

-- 
Daniel Veillard      | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
daniel veillard com  | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library  http://libvirt.org/


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]