mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-14 20:09:27 +02:00
* Patch from Graeme Geldenhuys to fix some minor issues in code generation (bug ID 13779)
git-svn-id: trunk@13897 -
This commit is contained in:
parent
8fdf9dd80c
commit
0bcf5a8488
@ -340,7 +340,7 @@ begin
|
|||||||
EndMethod(Strings,S);
|
EndMethod(Strings,S);
|
||||||
// AcceptVisitor
|
// AcceptVisitor
|
||||||
S:=BeginAcceptVisitor(Strings,C,ObjectClassName);
|
S:=BeginAcceptVisitor(Strings,C,ObjectClassName);
|
||||||
AddLn(Strings,'Result:=Result and (Visited.ObjectState in [posCreate,posdelete,posUpdate]);');
|
AddLn(Strings,'Result:=Result and (Visited.ObjectState in [posCreate,posDelete,posUpdate]);');
|
||||||
DecIndent;
|
DecIndent;
|
||||||
EndMethod(Strings,S);
|
EndMethod(Strings,S);
|
||||||
S:=BeginSetupParams(Strings,C,ObjectClassName,True);
|
S:=BeginSetupParams(Strings,C,ObjectClassName,True);
|
||||||
@ -431,7 +431,7 @@ begin
|
|||||||
// Common setup case
|
// Common setup case
|
||||||
If (V in [voCreate,voUpdate]) and (UseCommonSetupParams) then
|
If (V in [voCreate,voUpdate]) and (UseCommonSetupParams) then
|
||||||
A:=Format('TUpdateCreate%sVisitor',[StripType(ObjectClassName)])
|
A:=Format('TUpdateCreate%sVisitor',[StripType(ObjectClassName)])
|
||||||
else If (V in [voCreate,voDelete,voUpdate,voCommonSetupParams]) then
|
else If (V in [voCreate,voDelete,voUpdate,voCommonSetupParams,voSingleSaveVisitor]) then
|
||||||
A:='TtiVisitorUpdate'
|
A:='TtiVisitorUpdate'
|
||||||
else
|
else
|
||||||
A:='TtiVisitorSelect';
|
A:='TtiVisitorSelect';
|
||||||
@ -1226,7 +1226,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
Initialization
|
Initialization
|
||||||
RegisterCodeGenerator('tiOPF','tiOPF class and visitors for the data',TTiOPFCodeGenerator);
|
RegisterCodeGenerator('tiOPF','tiOPF classes and hard-coded visitors for the data',TTiOPFCodeGenerator);
|
||||||
|
|
||||||
Finalization
|
Finalization
|
||||||
UnRegisterCodeGenerator(TTiOPFCodeGenerator);
|
UnRegisterCodeGenerator(TTiOPFCodeGenerator);
|
||||||
|
@ -1279,6 +1279,8 @@ begin
|
|||||||
begin
|
begin
|
||||||
Addln(Strings,'Unit '+CodeOptions.UnitName+';');
|
Addln(Strings,'Unit '+CodeOptions.UnitName+';');
|
||||||
Addln(Strings);
|
Addln(Strings);
|
||||||
|
Addln(Strings, '{$mode objfpc}{$H+}');
|
||||||
|
Addln(Strings);
|
||||||
Addln(Strings,'Interface');
|
Addln(Strings,'Interface');
|
||||||
Addln(Strings);
|
Addln(Strings);
|
||||||
S:=GetInterfaceUsesClause;
|
S:=GetInterfaceUsesClause;
|
||||||
|
Loading…
Reference in New Issue
Block a user