Explorar o código

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

git-svn-id: trunk@36989 -
svenbarth %!s(int64=8) %!d(string=hai) anos
pai
achega
e74034dc34
Modificáronse 1 ficheiros con 3 adicións e 0 borrados
  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)^;