Fix win32 somewhat?
This commit is contained in:
@ -2,7 +2,10 @@
|
|||||||
#include "CrossLang.hpp"
|
#include "CrossLang.hpp"
|
||||||
#if defined(_WIN32)
|
#if defined(_WIN32)
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
|
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
#undef min
|
||||||
|
#undef max
|
||||||
#else
|
#else
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@ -94,11 +94,9 @@ namespace Tesses::CrossLang
|
|||||||
arr->data.resize(sz);
|
arr->data.resize(sz);
|
||||||
|
|
||||||
auto res = dict->CallMethod(ls2, "Read",{arr, (int64_t)0L, (int64_t)sz});
|
auto res = dict->CallMethod(ls2, "Read",{arr, (int64_t)0L, (int64_t)sz});
|
||||||
#if defined(_WIN32)
|
|
||||||
memcpy(buff,arr->data.data(),min(sz,arr->data.size()));
|
|
||||||
#else
|
|
||||||
memcpy(buff,arr->data.data(),std::min(sz,arr->data.size()));
|
memcpy(buff,arr->data.data(),std::min(sz,arr->data.size()));
|
||||||
#endif
|
|
||||||
int64_t r;
|
int64_t r;
|
||||||
if(GetObject(res,r)) return r;
|
if(GetObject(res,r)) return r;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user