[prev in list] [next in list] [prev in thread] [next in thread] 

List:       enlightenment-devel
Subject:    Re: [E-devel] Re: E CVS: libs/ebg atmosphere
From:       Corey Donohoe <atmos () atmos ! org>
Date:       2002-05-14 18:28:19
[Download RAW message or body]


On Monday, May 13, 2002, at 10:46 AM, Lyle Kempler wrote:

> * enlightenment-cvs@lists.sourceforge.net (enlightenment-
> cvs@lists.sourceforge.net) wrote:
>> Enlightenment CVS committal
>>
>> Author  : atmosphere
>> Project : e17
>> Module  : libs/ebg
>>
>> Dir     : e17/libs/ebg/src
>>
>>
>> Modified Files:
>> 	Ebg.h e_bg.c
>>
>>
>> Log Message:
>> Add e_bg_copy and C++ friendliness
>
> Wouldn't it be a lot easier to simply memcpy() or memmove() that whole
> structure instead of assigning each bit individually? Probably be a
> whole lot faster, too.
>
Well there are pointers to manually allocated memory in the E_Background 
that I don't think he(fukui-san) wants to share between backgrounds.  
It's a routine for copying all of the data in the structure so it can be 
freed just as easy as it was duplicated.    It is my understanding, 
correct me if I'm wrong, that memcpy will copy the addresses of the 
pointers in the structure and they'll be shared between the two.  
Sharing pointers between the two structures is not the desired result, 
so this is why its done this way.  This isn't a commonly used function 
call so speed is not a huge deal.  If memcpy will copy and duplicate the 
char strings, Evas_Lists, and the data in the nodes, then it sounds 
ideal.  If it can't then this implementation will suffice. =)

__
Corey Donohoe
atmos@atmos.org


_______________________________________________________________

Have big pipes? SourceForge.net is looking for download mirrors. We supply
the hardware. You get the recognition. Email Us: bandwidth@sourceforge.net
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic