[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Sheflug] stupid C question
> The problem is that user_data is a gpointer (==void *), so I
> cannot access it as I'd normally do with a pointer. This is illegal:
> *user_data = 9 ; (say)
can you not just cast it? eg:
*(int*)user_data = 9;
This is what I always do for a one off access to a void* (I have just
finished writing a WinNT device driver, which needs LOTS of this...
Craig
---------------------------------------------------------------------
Sheffield Linux User's Group - http://www.sheflug.co.uk
To unsubscribe from this list send mail to
- <sheflug-request [at] vuw.ac.nz> - with the word
"unsubscribe" in the body of the message.
GNU the choice of a complete generation.