#include "swap.h"
#include <string.h>

/* Swap generic function */
void swap(void *vp1, void *vp2, int size)
{
  char buffer[size];
  memcpy(buffer, vp1, size);
  memcpy(vp1,vp2,size);
  memcpy(vp2,buffer,size);
}

#include "swap.h"
#include <stdlib.h>
#include <string.h>

/* Swap generic function */
void swap(void *vp1, void *vp2, int size)
{
  char* buffer = (char*) malloc(size*sizeof(char));
  memcpy(buffer, vp1, size);
  memcpy(vp1,vp2,size);
  memcpy(vp2,buffer,size);
  free(buffer);
}

Use malloc/free as compile failed under MSVC. Ask rpmuller to check if okay.
Use malloc/free as compile failed under MSVC. Ask rpmuller to check if okay.

git-svn-id: 6e15fd90c9d760a7473dfa00402abf17076c345c@188 64417113-1622-0410-aef8-ef15d1a3721e
