Răsfoiți Sursa

Return access to __s as a RawConstPointer (#10038)

Aidan Lee 4 ani în urmă
părinte
comite
3419f602db
1 a modificat fișierele cu 1 adăugiri și 1 ștergeri
  1. 1 1
      src/generators/gencpp.ml

+ 1 - 1
src/generators/gencpp.ml

@@ -2636,7 +2636,7 @@ let retype_expression ctx request_type function_args function_type expression_tr
                else if fieldName="cca" && obj.cpptype=TCppString then
                   CppFunction( FuncInternal(obj,"cca","."), TCppScalar("int")), TCppDynamic
                else if fieldName="__s" && obj.cpptype=TCppString then
-                  CppVar( VarInternal(obj,".","utf8_str()")), TCppPointer("ConstPointer", TCppScalar("char"))
+                  CppVar( VarInternal(obj,".","utf8_str()")), TCppRawPointer("const ", TCppScalar("char"))
                else if fieldName="__Index" then
                   CppEnumIndex(obj), TCppScalar("int")
                else if is_internal_member fieldName || cpp_is_real_array obj then begin