Browse Source

* allow making a TValue with a procedure/function or method variable

git-svn-id: trunk@36989 -
svenbarth 8 years ago
parent
commit
e74034dc34
1 changed files with 3 additions and 0 deletions
  1. 3 0
      packages/rtl-objpas/src/inc/rtti.pp

+ 3 - 0
packages/rtl-objpas/src/inc/rtti.pp

@@ -547,6 +547,7 @@ type
   PBoolean64 = ^Boolean64;
   PByteBool = ^ByteBool;
   PQWordBool = ^QWordBool;
+  PMethod = ^TMethod;
 begin
   result.FData.FTypeInfo:=ATypeInfo;
   { resets the whole variant part; FValueData is already Nil }
@@ -568,6 +569,8 @@ begin
     tkInterface: result.FData.FValueData := TValueDataIntImpl.CreateRef(ABuffer, ATypeInfo, True);
     tkInt64    : result.FData.FAsSInt64 := PInt64(ABuffer)^;
     tkQWord    : result.FData.FAsUInt64 := PQWord(ABuffer)^;
+    tkProcVar  : result.FData.FAsMethod.Code := PCodePointer(ABuffer)^;
+    tkMethod   : result.FData.FAsMethod := PMethod(ABuffer)^;
     tkInteger  : begin
                    case GetTypeData(ATypeInfo)^.OrdType of
                      otSByte: result.FData.FAsSByte := PShortInt(ABuffer)^;