Small fixes again

This commit is contained in:
ocoursiere
2002-11-30 03:25:51 +00:00
parent 87ddf2e772
commit 3eac55ae74
2 changed files with 10 additions and 3 deletions

View File

@@ -503,11 +503,13 @@ begin
else else
Add(Format('function %s.%s%s', [CppToPas(Classe.Name + ' *'), ProcName, EndChar])); Add(Format('function %s.%s%s', [CppToPas(Classe.Name + ' *'), ProcName, EndChar]));
end; end;
//Body // Implementation body
if (ResultType.Typ = '') or (ResultType.Typ = 'void') then if IsConstructor then
BodyPas := Format(' CPlusObject := %s_%s%s', [Classe.Name, ProcName, SelfParamImpl])
else if (ResultType.Typ = '') or (ResultType.Typ = 'void') then
BodyPas := Format(' %s_%s%s', [Classe.Name, ProcName, SelfParamImpl]) BodyPas := Format(' %s_%s%s', [Classe.Name, ProcName, SelfParamImpl])
else else
BodyPas := Format(' %s_%s%s', [Classe.Name, ProcName, SelfParamImpl]); BodyPas := Format(' Result := %s_%s%s', [Classe.Name, ProcName, SelfParamImpl]);
end; end;
procedure TFunction.Ends; procedure TFunction.Ends;

View File

@@ -105,6 +105,11 @@ begin
FPas := TStringList.Create; FPas := TStringList.Create;
FPas.Add(PasLicense); FPas.Add(PasLicense);
FPas.Add('unit ' + LowerCase(FFileName) + ';'); FPas.Add('unit ' + LowerCase(FFileName) + ';');
FPas.Add('');
FPas.Add('interface');
FPas.Add('');
FPas.Add('uses');
FPas.Add(' beobj;');
FInterfacePas := TStringList.Create; FInterfacePas := TStringList.Create;
FImplementationPas := TStringList.Create; FImplementationPas := TStringList.Create;
FImportFuncsPas := TStringList.Create; FImportFuncsPas := TStringList.Create;