compile success with go 1.16.4, large expansion uwu

This commit is contained in:
2023-04-08 20:59:48 -07:00
parent 65dc43267a
commit 1eac67d09a
11 changed files with 406 additions and 676 deletions

View File

@@ -6,8 +6,6 @@ extern void goRVExtension(char *output, size_t outputSize, char *input);
extern void goRVExtensionVersion(char *output, size_t outputSize);
extern void goRVExtensionArgs(char *output, size_t outputSize, char *input, char **argv, int argc);
extern void goRVExtensionRegisterCallback(extensionCallback fnc);
// context is new
extern void goRVExtensionContext(const char **argv, int argc);
#ifdef WIN64
__declspec(dllexport) void RVExtension(char *output, size_t outputSize, char *input)
@@ -29,12 +27,6 @@ __declspec(dllexport) void RVExtensionRegisterCallback(extensionCallback fnc)
{
goRVExtensionRegisterCallback(fnc);
}
// context is new
__declspec(dllexport) void RVExtensionContext(const char **argv, int argc)
{
goRVExtensionContext(argv, argc);
}
#else
__declspec(dllexport) void __stdcall _RVExtension(char *output, size_t outputSize, char *input)
{
@@ -55,11 +47,15 @@ __declspec(dllexport) void __stdcall _RVExtensionRegisterCallback(extensionCallb
{
goRVExtensionRegisterCallback(fnc);
}
// context is new
__declspec(dllexport) void __stdcall _RVExtensionContext(const char **argv, int argc)
{
goRVExtensionContext(argv, argc);
}
#endif
// do this for all the other exported functions
// do this for all the other exported functions
// dll entrypoint
// Path: RVExtension.c
#include <windows.h>
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
{
return TRUE;
}