-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hrvoje Niksic wrote:
> Micah Cowan <[EMAIL PROTECTED]> writes:
>
>> Note that you could also do all the pointer maths up-front, leaving
>> existing usage code the same, with something like:
>>
>> static const char foo_data[] = "one\0two\0three";
>> static const char * const foo = {foo_data + 0, foo_data + 4,
>> foo_data + 8};
>
> I believe that doesn't help because foo[] remains an array of
> pointers, each of which needs to be reloacated.
Right. What I was meaning to prevent, though, is the need to do:
foo[foo_data + foo_idx[i]]
and instead do:
foo[i]
(The quoted code is accidentally missing the array declarator for foo,
but you knew that.)
- --
Micah J. Cowan
Programmer, musician, typesetting enthusiast, gamer...
http://micah.cowan.name/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFHo71Z7M8hyUobTrERAiT5AJ44dnF2IOx1h/bdWcY2kGUb9ifhSQCfQ81L
KSQGt/dY04nhQYxAPYBSQk4=
=gglO
-----END PGP SIGNATURE-----