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

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

 



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@xxxxxxxxxxxx  | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library  http://libvirt.org/

--
Libvir-list mailing list
Libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]