add support for serialization/writing DNA on big endian machines

fix for swapping endianness for nested array of structures
This commit is contained in:
erwin.coumans
2010-01-28 10:56:38 +00:00
parent 0814473528
commit ae0e78efd8
3 changed files with 442 additions and 389 deletions

View File

@@ -341,6 +341,7 @@ static int name_is_array(char* name, int* dim1, int* dim2) {
// ----------------------------------------------------- //
void bDNA::init(char *data, int len, bool swap)
{
printf("swap = %d\n",swap);
int *intPtr=0;short *shtPtr=0;
char *cp = 0;int dataLen =0;long nr=0;
intPtr = (int*)data;