CObjects: the CIntSize

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

CObjects: the CIntSize

Dmitry Matveev
Hello Paolo and the list,

Browsing the CObject sources I've found the following:

CInt class >> alignof [
    "Answer the receiver's required aligment"

    <category: 'accessing'>
    ^CIntSize
]

In the repl, "CInt alignof" results as 4 (an instance of SmallInteger).
But I did not found the declaration of the CIntSize. What is it? Is it
a constant or it's a class? How can I determine this value?

Thanks,
Dmitry

_______________________________________________
help-smalltalk mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/help-smalltalk
Reply | Threaded
Open this post in threaded view
|

Re: CObjects: the CIntSize

Paolo Bonzini-2
On 06/29/2010 01:39 PM, Dmitry Matveev wrote:

> Hello Paolo and the list,
>
> Browsing the CObject sources I've found the following:
>
> CInt class>>  alignof [
>      "Answer the receiver's required aligment"
>
>      <category: 'accessing'>
>      ^CIntSize
> ]
>
> In the repl, "CInt alignof" results as 4 (an instance of SmallInteger).
> But I did not found the declaration of the CIntSize. What is it? Is it
> a constant or it's a class? How can I determine this value?

See init_c_symbols in libgst/dict.c.

CIntSize is just sizeof(int).  It is a global variable in the CSymbols
namespace.

Paolo

_______________________________________________
help-smalltalk mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/help-smalltalk