Browse Source

[cpp] generate Void as null

Dan Korostelev 4 years ago
parent
commit
8b5fddcfda
1 changed files with 3 additions and 0 deletions
  1. 3 0
      src/generators/gencpp.ml

+ 3 - 0
src/generators/gencpp.ml

@@ -2908,6 +2908,9 @@ let retype_expression ctx request_type function_args function_type expression_tr
             else
                arrayExpr, elemType
 
+         | TTypeExpr (TAbstractDecl { a_path = [],"Void" }) ->
+            CppNull, TCppNull
+
          | TTypeExpr module_type ->
             let path = t_path module_type in
             CppClassOf(path, is_native_gen_module module_type), TCppClass