<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<p>i dont understand,</p>
<p>i have an external function from libc and i see size_t as
datatype.</p>
<p>size_t is unsigned integer</p>
<p>on function declaration what should i set for size_t, AS Integer
or AS Long?</p>
<p>for example i have this</p>
<p>'void setbuffer (FILE *stream, char *buf, size_t size)<br>
Public Extern setbuffer(stream As Pointer, buf As Pointer, size As
Integer) 'FIXME size_t int or long?<br>
</p>
<br>
<div class="moz-cite-prefix">On 06/10/2018 07:45 PM, Jussi Lahtinen
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAFJMe7TrrW+r+=W7VwgPRKa3Eyfrryj-KT6w7_41OryCus-P+Q@mail.gmail.com">
<div dir="ltr">
<div>So, it's 32bit integer. Most likely the library reads only
32 bit from the memory, and thus "long" wont help you.<br>
</div>
<div><br>
</div>
<div> Gambas integer reserves one bit for sign and thus returned
values are not correctly displayed in Gambas side.</div>
<div>However you can display them correctly by using binary
representation.</div>
<div><br>
</div>
<div><br>
</div>
<div>Jussi<br>
</div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Sun, Jun 10, 2018 at 6:38 PM,
Demosthenes Koptsis <span dir="ltr"><<a
href="mailto:demosthenesk@gmail.com" target="_blank"
moz-do-not-send="true">demosthenesk@gmail.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">hello,<br>
<br>
i want to use an unsigned int in external function, which
gambas datatype should i use?<br>
<br>
Integer or Long?<br>
<br>
The range of values is 0 to 4,294,967,295<br>
<br>
<br>
----[ Gambas mailing-list is hosted by <a
href="https://www.hostsharing.net" rel="noreferrer"
target="_blank" moz-do-not-send="true">https://www.hostsharing.net</a>
]----<br>
</blockquote>
</div>
<br>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">
----[ Gambas mailing-list is hosted by <a class="moz-txt-link-freetext" href="https://www.hostsharing.net">https://www.hostsharing.net</a> ]----
</pre>
</blockquote>
<br>
</body>
</html>