Explorar o código

Return access to __s as a RawConstPointer (#10038)

Aidan Lee %!s(int64=4) %!d(string=hai) anos
pai
achega
3419f602db
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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