Fix minor cinterop bug with clashing macro and enum constant
This commit is contained in:
committed by
SvyatoslavScherbina
parent
f9346f5d5c
commit
67b06b5f2a
+1
-1
@@ -170,7 +170,7 @@ class StubGenerator(
|
||||
|
||||
val functionsToBind = nativeIndex.functions.filter { it.name !in excludedFunctions }
|
||||
|
||||
private val macroConstantsByName = nativeIndex.macroConstants.associateBy { it.name }
|
||||
private val macroConstantsByName = (nativeIndex.macroConstants + nativeIndex.wrappedMacros).associateBy { it.name }
|
||||
|
||||
val kotlinFile = object : KotlinFile(pkgName, namesToBeDeclared = computeNamesToBeDeclared()) {
|
||||
override val mappingBridgeGenerator: MappingBridgeGenerator
|
||||
|
||||
@@ -41,6 +41,10 @@ int global_var = 5;
|
||||
#define PTR_SUM (INT_PTR + 1)
|
||||
#define PTR_SUM_EXPECTED (sizeof(int) + 1)
|
||||
|
||||
enum {
|
||||
INT_CALL = 1 // Should be replaced by macro below.
|
||||
};
|
||||
|
||||
#define PTR_CALL ptr_call()
|
||||
#define INT_CALL int_call()
|
||||
#define CALL_SUM (int_call() + int_call())
|
||||
|
||||
Reference in New Issue
Block a user