On Sun, Mar 16, 2014, at 09:41 PM, Dave Hylands wrote: > Hi, > > I'm jumping in late here, but why not just do: > > *(hal_data_u *)data_addr = pin->dummysig; > > which is a structure copy, and the compiler will optimize it to use the > best way of copying based on the size? >
I didn't know you could copy structures like that in C. Does it work for any size structure? When was that added to the language? I'm 99.4% certain that in the K&R days you had to copy structs yourself. Is it maybe a C99 thing? Clearly, that is the right way to do it. -- John Kasunich [email protected] ------------------------------------------------------------------------------ Learn Graph Databases - Download FREE O'Reilly Book "Graph Databases" is the definitive new guide to graph databases and their applications. Written by three acclaimed leaders in the field, this first edition is now available. Download your free book today! http://p.sf.net/sfu/13534_NeoTech _______________________________________________ Emc-developers mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/emc-developers
