He was pointing and he specifically said that above. Yes, he got his
language wrong in the last reply - but you prompted him into that.
That's still absolutely unclear. One of the code snippets Roman
posted upthread on the use of the function was:
| int main(void)
| {
| node *p = NULL;
|
| list_add_head(&p, (int *)100);
| list_add_head(&p, (char *)'X');
| ...
| return 0;
| }
This makes it look as if he tries to store the value of an
object (of arbitrary type) in a void pointer and not just
pointers to objects. And that's what he then repeated in
words in his last post.
Or, if his other post is to believed,
| I want to hold pointers on to objects of various types in the structurre
| member, named 'data'. I declared it as 'void *' and faced various problems
then he might be assuming wrongly that e.g. "(int *) 100"
would result in a pointer to somewhere where the number 100
would be stored. So Roman may be believing that he want's
to store pointers, but what he's actually doing is storing
is a pointer that is the result of a non-portable conversion
data he won't be able to use reasonably. My bet at the moment
is that he actually wants to store values and doesn't realize
that casting to a void pointer and storing the result won't
do what he expects it to do. But he's the only person that
can tell us.
Why do you always feel the need to embellish and obfuscate?
Richard Heathfield is just trying to figure out what Roman
is up to and what exactly his mis-conceptions are. And what
you call "embellish and obfuscate" is actually trying to
elicit a clear answer about what Roman really wants to do.
And, of course, there also still remains the problem of how
to get the data out of the list again when it's not stored
what the original type was, independent of the question if
values or pointers are to be stored in the list elements.
Regards, Jens