#include <stdio.h>
#include <string.h>

#ifdef WIN32
#define DLLEXPORT __declspec(dllexport)
#else
#define DLLEXPORT extern
#endif

DLLEXPORT void * ReturnSomePointer()
{
    char *x = "Got passed back the pointer I returned";
    return x;
}

DLLEXPORT int CompareSomePointer(void *ptr)
{
    int x = strcmp("Got passed back the pointer I returned", ptr) == 0;
    return x;
}

DLLEXPORT void * ReturnNullPointer()
{
    return NULL;
}

DLLEXPORT void * TakeTwoPointersToInt(int *ptr1, int *ptr2)
{
    return NULL;
}

DLLEXPORT void * TakeCArrayToInt8(int array[]) {
    return NULL;
}

#include <stdio.h>
#include <string.h>

#ifdef WIN32
#define DLLEXPORT __declspec(dllexport)
#else
#define DLLEXPORT extern
#endif

DLLEXPORT void * ReturnSomePointer()
{
    return strdup("Got passed back the pointer I returned");
}

DLLEXPORT int CompareSomePointer(void *ptr)
{
    int x = strcmp("Got passed back the pointer I returned", ptr) == 0;
    free(ptr);
    return x;
}

DLLEXPORT void * ReturnNullPointer()
{
    return NULL;
}

DLLEXPORT void * TakeTwoPointersToInt(int *ptr1, int *ptr2)
{
    return NULL;
}

DLLEXPORT void * TakeCArrayToInt8(int array[]) {
    return NULL;
}

Fix C issue in NativeCall tests.
Fix C issue in NativeCall tests.

One of the pointer tests returned a pointer to astack allocated string outside
of the function, which is not very safe. Replace it with a strdup()ed string
that's freed on verification.
