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,7 +1266,13 @@ begin
|
|||||||
If Not Assigned(typData) Then
|
If Not Assigned(typData) Then
|
||||||
Error('Object type not registered : %s',[IfThen(Assigned(ATypeInfo),ATypeInfo^.Name,'')]);
|
Error('Object type not registered : %s',[IfThen(Assigned(ATypeInfo),ATypeInfo^.Name,'')]);
|
||||||
mustAddAtt := False;
|
mustAddAtt := False;
|
||||||
nmspc := typData.NameSpace;
|
if ( ATypeInfo^.Kind = tkClass ) and
|
||||||
|
GetTypeData(ATypeInfo)^.ClassType.InheritsFrom(TAbstractSimpleRemotable) and
|
||||||
|
HasScope()
|
||||||
|
then
|
||||||
|
nmspc := StackTop().NameSpace
|
||||||
|
else
|
||||||
|
nmspc := typData.NameSpace;
|
||||||
If IsStrEmpty(nmspc) Then
|
If IsStrEmpty(nmspc) Then
|
||||||
nmspcSH := 'tns'
|
nmspcSH := 'tns'
|
||||||
Else Begin
|
Else Begin
|
||||||
@ -1296,7 +1302,7 @@ begin
|
|||||||
xsiNmspcSH := GetNameSpaceShortName(sXSI_NS,True);
|
xsiNmspcSH := GetNameSpaceShortName(sXSI_NS,True);
|
||||||
if not IsStrEmpty(xsiNmspcSH) then
|
if not IsStrEmpty(xsiNmspcSH) then
|
||||||
xsiNmspcSH := xsiNmspcSH + ':';
|
xsiNmspcSH := xsiNmspcSH + ':';
|
||||||
AddScopeAttribute(xsiNmspcSH + sTYPE,Format('%s:%s',[nmspcSH,typData.DeclaredName]));
|
AddScopeAttribute(xsiNmspcSH + sTYPE,Format('%s:%s',[GetNameSpaceShortName(typData.NameSpace,True),typData.DeclaredName]));
|
||||||
end;
|
end;
|
||||||
StackTop().SetNameSpace(nmspc);
|
StackTop().SetNameSpace(nmspc);
|
||||||
end;
|
end;
|
||||||
@ -1470,7 +1476,13 @@ begin
|
|||||||
if not Assigned(typData) then begin
|
if not Assigned(typData) then begin
|
||||||
Error('Object type not registered : %s',[IfThen(Assigned(ATypeInfo),ATypeInfo^.Name,'')]);
|
Error('Object type not registered : %s',[IfThen(Assigned(ATypeInfo),ATypeInfo^.Name,'')]);
|
||||||
end;
|
end;
|
||||||
nmspc := typData.NameSpace;
|
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
|
if IsStrEmpty(nmspc) then begin
|
||||||
nmspcSH := ''
|
nmspcSH := ''
|
||||||
end else begin
|
end else begin
|
||||||
@ -1514,6 +1526,10 @@ begin
|
|||||||
StackTop().SetNameSpace(nmspc);
|
StackTop().SetNameSpace(nmspc);
|
||||||
end;
|
end;
|
||||||
Result := StackTop().GetItemsCount();
|
Result := StackTop().GetItemsCount();
|
||||||
|
if ( Result = 0 ) and ( AScopeType = stArray ) then begin
|
||||||
|
PopStack().Free();
|
||||||
|
Result := -1;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user