Copying an object
- From: Russell Shaw <rjshaw iprimus com au>
- To: gtk-app-devel-list gnome org
- Subject: Copying an object
- Date: Sat, 25 Oct 2003 20:31:49 +1000
Hi,
I have C structs containing data and pointers to other objects and data.
It is like OOP in C. I need to make a copy of an object, but found it is
really tedious in C. The data in the struct can be copied, but you need
to recursively follow pointers, do a malloc, then copy the data that was
pointed at, into the new malloced area.
Is there an easy way to do it? Can g_object do it? C++?
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]