瀏覽代碼

* fixed type correctness of array parameter handling for calls to
fpc_addref_array/fpc_finalize_array (those helpers expect a pointer
to the elements of the array, not a pointer to the array)

git-svn-id: trunk@32779 -

Jonas Maebe 9 年之前
父節點
當前提交
1a09209659
共有 1 個文件被更改,包括 2 次插入0 次删除
  1. 2 0
      compiler/hlcgobj.pas

+ 2 - 0
compiler/hlcgobj.pas

@@ -4878,6 +4878,7 @@ implementation
                 else
                   highloc.loc:=LOC_INVALID;
                 eldef:=tarraydef(tparavarsym(p).vardef).elementdef;
+                g_ptrtypecast_ref(list,cpointerdef.getreusable(tparavarsym(p).vardef),cpointerdef.getreusable(eldef),href);
                 g_array_rtti_helper(list,eldef,href,highloc,'fpc_finalize_array');
               end
             else
@@ -4943,6 +4944,7 @@ implementation
                          { open arrays do not contain correct element count in their rtti,
                            the actual count must be passed separately. }
                          eldef:=tarraydef(tparavarsym(p).vardef).elementdef;
+                         g_ptrtypecast_ref(list,cpointerdef.getreusable(tparavarsym(p).vardef),cpointerdef.getreusable(eldef),href);
                          g_array_rtti_helper(list,eldef,href,highloc,'fpc_addref_array');
                        end
                      else