You've already forked lazarus-ccr
fix TAbstractSimpleRemotable serialization
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@867 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -1266,6 +1266,12 @@ begin
|
||||
If Not Assigned(typData) Then
|
||||
Error('Object type not registered : %s',[IfThen(Assigned(ATypeInfo),ATypeInfo^.Name,'')]);
|
||||
mustAddAtt := False;
|
||||
if ( ATypeInfo^.Kind = tkClass ) and
|
||||
GetTypeData(ATypeInfo)^.ClassType.InheritsFrom(TAbstractSimpleRemotable) and
|
||||
HasScope()
|
||||
then
|
||||
nmspc := StackTop().NameSpace
|
||||
else
|
||||
nmspc := typData.NameSpace;
|
||||
If IsStrEmpty(nmspc) Then
|
||||
nmspcSH := 'tns'
|
||||
@ -1296,7 +1302,7 @@ begin
|
||||
xsiNmspcSH := GetNameSpaceShortName(sXSI_NS,True);
|
||||
if not IsStrEmpty(xsiNmspcSH) then
|
||||
xsiNmspcSH := xsiNmspcSH + ':';
|
||||
AddScopeAttribute(xsiNmspcSH + sTYPE,Format('%s:%s',[nmspcSH,typData.DeclaredName]));
|
||||
AddScopeAttribute(xsiNmspcSH + sTYPE,Format('%s:%s',[GetNameSpaceShortName(typData.NameSpace,True),typData.DeclaredName]));
|
||||
end;
|
||||
StackTop().SetNameSpace(nmspc);
|
||||
end;
|
||||
@ -1470,6 +1476,12 @@ begin
|
||||
if not Assigned(typData) then begin
|
||||
Error('Object type not registered : %s',[IfThen(Assigned(ATypeInfo),ATypeInfo^.Name,'')]);
|
||||
end;
|
||||
if ( ATypeInfo^.Kind = tkClass ) and
|
||||
GetTypeData(ATypeInfo)^.ClassType.InheritsFrom(TAbstractSimpleRemotable) and
|
||||
HasScope()
|
||||
then
|
||||
nmspc := StackTop().NameSpace
|
||||
else
|
||||
nmspc := typData.NameSpace;
|
||||
if IsStrEmpty(nmspc) then begin
|
||||
nmspcSH := ''
|
||||
@ -1514,6 +1526,10 @@ begin
|
||||
StackTop().SetNameSpace(nmspc);
|
||||
end;
|
||||
Result := StackTop().GetItemsCount();
|
||||
if ( Result = 0 ) and ( AScopeType = stArray ) then begin
|
||||
PopStack().Free();
|
||||
Result := -1;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
|
Reference in New Issue
Block a user