Merge pull request #2445 from kuruczgy/gyuri/refc-fix-extract-unit

[ fix ] Fix usage of `void` instead of `NULL` for Unit value in RefC
This commit is contained in:
Zoe Stafford 2022-05-01 20:38:47 +01:00 committed by GitHub
commit 2a9477c545
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -814,7 +814,7 @@ emitFDef funcName ((varType, varName, varCFType) :: xs) = do
data CLang = CLangC | CLangRefC
extractValue : (cLang : CLang) -> (cfType:CFType) -> (varName:String) -> String
extractValue _ CFUnit varName = "void"
extractValue _ CFUnit varName = "NULL"
extractValue _ CFInt varName = "((Value_Int64*)" ++ varName ++ ")->i64"
extractValue _ CFInt8 varName = "((Value_Int8*)" ++ varName ++ ")->i8"
extractValue _ CFInt16 varName = "((Value_Int16*)" ++ varName ++ ")->i16"