yum-mirror/slang

Making it easier to work with shaders

git clone https://git.yummers.dev/yum-mirror/slang

Ellie Hermaszewskaformatf65d756bf

master
508 B23 linesraw
1// TEST(smoke):CPP_COMPILER_COMPILE: -pass-through c -entry test -target callable
2
3#include <stdio.h>
4#include <stdlib.h>
5#include <string.h>
6
7#if defined(_MSC_VER)
8#define DLL_EXPORT __declspec(dllexport)
9#else
10#define DLL_EXPORT __attribute__((__visibility__("default")))
11#endif
12
13#ifdef __cplusplus
14#define EXTERN_C extern "C"
15#else
16#define EXTERN_C
17#endif
18
19EXTERN_C DLL_EXPORT int test(int intValue, const char* textValue, char* outTextValue)
20{
21    strcpy(outTextValue, textValue);
22    return intValue;
23}