瀏覽代碼

[cpp] generate Void as null

Dan Korostelev 4 年之前
父節點
當前提交
8b5fddcfda
共有 1 個文件被更改,包括 3 次插入0 次删除
  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