Browse Source

* fixed various procvars being casted to pointer instead of codepointer in the rtl

git-svn-id: trunk@32167 -
nickysn 9 years ago
parent
commit
e2ed8f2251
2 changed files with 8 additions and 8 deletions
  1. 3 3
      rtl/inc/system.inc
  2. 5 5
      rtl/objpas/typinfo.pp

+ 3 - 3
rtl/inc/system.inc

@@ -1115,7 +1115,7 @@ end;
 
 Procedure HandleErrorAddrFrame (Errno : longint;addr : CodePointer; frame : Pointer);[public,alias:'FPC_BREAK_ERROR']; {$ifdef CPUI386} register; {$endif}
 begin
-  If pointer(ErrorProc)<>Nil then
+  If codepointer(ErrorProc)<>Nil then
     ErrorProc(Errno,addr,frame);
   errorcode:=word(Errno);
   erroraddr:=addr;
@@ -1429,7 +1429,7 @@ end;
 
 procedure fpc_AbstractErrorIntern;compilerproc;[public,alias : 'FPC_ABSTRACTERROR'];
 begin
-  If pointer(AbstractErrorProc)<>nil then
+  If codepointer(AbstractErrorProc)<>nil then
     AbstractErrorProc();
   HandleErrorAddrFrameInd(211,get_pc_addr,get_frame);
 end;
@@ -1438,7 +1438,7 @@ end;
 Procedure fpc_assert(Const Msg,FName:Shortstring;LineNo:Longint;
    ErrorAddr:Pointer); [Public,Alias : 'FPC_ASSERT']; compilerproc;
 begin
-  if pointer(AssertErrorProc)<>nil then
+  if codepointer(AssertErrorProc)<>nil then
     AssertErrorProc(Msg,FName,LineNo,ErrorAddr)
   else
     HandleErrorAddrFrameInd(227,get_pc_addr,get_frame);

+ 5 - 5
rtl/objpas/typinfo.pp

@@ -1950,7 +1950,7 @@ end;
   Variant properties
   ---------------------------------------------------------------------}
 
-Procedure CheckVariantEvent(P : Pointer);
+Procedure CheckVariantEvent(P : CodePointer);
 
 begin
   If (P=Nil) then
@@ -1959,14 +1959,14 @@ end;
 
 Function GetVariantProp(Instance : TObject;PropInfo : PPropInfo): Variant;
 begin
-  CheckVariantEvent(Pointer(OnGetVariantProp));
+  CheckVariantEvent(CodePointer(OnGetVariantProp));
   Result:=OnGetVariantProp(Instance,PropInfo);
 end;
 
 
 Procedure SetVariantProp(Instance : TObject;PropInfo : PPropInfo; const Value: Variant);
 begin
-   CheckVariantEvent(Pointer(OnSetVariantProp));
+   CheckVariantEvent(CodePointer(OnSetVariantProp));
    OnSetVariantProp(Instance,PropInfo,Value);
 end;
 
@@ -1996,14 +1996,14 @@ end;
 Function GetPropValue(Instance: TObject; const PropName: string; PreferStrings: Boolean): Variant;
 
 begin
-  CheckVariantEvent(Pointer(OnGetPropValue));
+  CheckVariantEvent(CodePointer(OnGetPropValue));
   Result:=OnGetPropValue(Instance,PropName,PreferStrings)
 end;
 
 Procedure SetPropValue(Instance: TObject; const PropName: string;  const Value: Variant);
 
 begin
-  CheckVariantEvent(Pointer(OnSetPropValue));
+  CheckVariantEvent(CodePointer(OnSetPropValue));
   OnSetPropValue(Instance,PropName,Value);
 end;