diff --git a/IncusBindings/libUGM_Incus_InternalFuncs.h b/IncusBindings/libUGM_Incus_InternalFuncs.h index 5bb47f3..6c006ab 100644 --- a/IncusBindings/libUGM_Incus_InternalFuncs.h +++ b/IncusBindings/libUGM_Incus_InternalFuncs.h @@ -12,6 +12,8 @@ #ifndef GO_CGO_GOSTRING_TYPEDEF typedef struct { const char *p; ptrdiff_t n; } _GoString_; +extern size_t _GoStringLen(_GoString_ s); +extern const char *_GoStringPtr(_GoString_ s); #endif #endif @@ -44,10 +46,16 @@ typedef size_t GoUintptr; typedef float GoFloat32; typedef double GoFloat64; #ifdef _MSC_VER +#if !defined(__cplusplus) || _MSVC_LANG <= 201402L #include typedef _Fcomplex GoComplex64; typedef _Dcomplex GoComplex128; #else +#include +typedef std::complex GoComplex64; +typedef std::complex GoComplex128; +#endif +#else typedef float _Complex GoComplex64; typedef double _Complex GoComplex128; #endif @@ -74,10 +82,10 @@ typedef struct { void *data; GoInt len; GoInt cap; } GoSlice; extern "C" { #endif -extern void IncusRunXHost(); -extern char* IncusGetError(); -extern char IncusCreateConnection(); -extern void IncusDestroyConnection(); +extern void IncusRunXHost(void); +extern char* IncusGetError(void); +extern char IncusCreateConnection(void); +extern void IncusDestroyConnection(void); extern char IncusStartContainer(char* name); extern char IncusStopContainer(char* name); extern char IncusRestartContainer(char* name);