please excuse very basic questions: gchar and g_free()
- From: "F. Kater" <f kater2 gmx net>
- To: gtk-app-devel-list gnome org
- Subject: please excuse very basic questions: gchar and g_free()
- Date: Wed, 24 Nov 2004 00:35:36 +0100
Hi,
I've got some basic questions about gchar:
What's actually the size of the array: gchar g[10]? 10 bytes (0-9) or 11
(0-11)?
Is the last byte occupied by a 0 to terminate the array?
How would g_free() behave if I had created the array with the new
operator and would then overwrite the last byte (zero) with another
value?
Is it okay to do reinterpreting casts from gchar* to guint8* (and vice
versa) or do I loose the terminating 0 byte? Further, could a single
gchar be 2 bytes long in some contexts (maybe because of a two-byte
character table)?
Finally, how does g_free know from a dynamically created guint8 array
where is its end in memory?
I hope I didn't bother anyone with these things...
Felix
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]