Types... Slate -> C -> Slate conversión
Pupeno
pupeno at pupeno.com
Wed Oct 13 16:24:40 PDT 2004
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
When making the SDL wrapper, I've found a lot of 'new' (they are not really
new, nothing in C is new) types. Basically, SDL uses this types: Sint8,
Uint8, Sin16, Uint16, Sint32, Uint32, Sint64 and Uint64.
They are basically ints, signed or unsigned of that sizes in bits.
I think the best thing is to use ByteArrays, right ?
But then, how do I convert between ByteArrays to those things and back (sorry,
I don't remember much of my digital lessons, so, managing signed and unsigned
numbers is not easy for me).
Should I use SmallInteger somewhere ?
Wouldn't it be nice to use plain Integers and add methods like:
asSignedInteger8, asSignedInteger16, asSignedInteger32, asSignedInteger64,
asUnsignedInteger8, asUnsignedInteger16, asUnsignedInteger32 and
asUnsignedInteger64. Or maybe this is plain wrong :( Any help is appretiated.
- --
Pupeno: pupeno at pupeno.com - http://www.pupeno.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)
iD8DBQFBbbk6fW48a9PWGkURAnNDAJ9rvQDlD2mztEMkQ5l8KkvFoE8NYwCfZsqB
OiI5cXMf3bs6jFYoUH+t6s0=
=K1f0
-----END PGP SIGNATURE-----
More information about the Slate
mailing list