cgo: add support for #define constants

These are converted to Go constants where possible.
This commit is contained in:
Ayke van Laethem
2019-04-28 14:10:03 +02:00
committed by Ron Evans
parent eb0ce8a298
commit 99587fe073
6 changed files with 150 additions and 2 deletions
+7
View File
@@ -10,6 +10,13 @@ int doCallback(int a, int b, binop_t cb);
typedef int * intPointer;
void store(int value, int *ptr);
# define CONST_INT 5
# define CONST_INT2 5llu
# define CONST_FLOAT 5.8
# define CONST_FLOAT2 5.8f
# define CONST_CHAR 'c'
# define CONST_STRING "defined string"
// this signature should not be included by CGo
void unusedFunction2(int x, __builtin_va_list args);