Small fixes
This commit is contained in:
@@ -483,7 +483,8 @@ begin
|
|||||||
// Import of C functions
|
// Import of C functions
|
||||||
with SourceWriter.ImportFuncsPas do
|
with SourceWriter.ImportFuncsPas do
|
||||||
begin
|
begin
|
||||||
if (ResultType.Typ = '') or (ResultType.Typ = 'void') then
|
if ((ResultType.Typ = '') or (ResultType.Typ = 'void')) and
|
||||||
|
not IsConstructor then
|
||||||
Add(Format('procedure %s_%s%s', [Classe.Name, ProcName, SelfParam]))
|
Add(Format('procedure %s_%s%s', [Classe.Name, ProcName, SelfParam]))
|
||||||
else
|
else
|
||||||
Add(Format('function %s_%s%s', [Classe.Name, ProcName, SelfParam]));
|
Add(Format('function %s_%s%s', [Classe.Name, ProcName, SelfParam]));
|
||||||
@@ -491,7 +492,14 @@ begin
|
|||||||
with SourceWriter.ImplementationPas do
|
with SourceWriter.ImplementationPas do
|
||||||
begin
|
begin
|
||||||
if (ResultType.Typ = '') or (ResultType.Typ = 'void') then
|
if (ResultType.Typ = '') or (ResultType.Typ = 'void') then
|
||||||
Add(Format('procedure %s.%s%s', [CppToPas(Classe.Name + ' *'), ProcName, EndChar]))
|
begin
|
||||||
|
if IsConstructor then
|
||||||
|
Add(Format('constructor %s.%s%s', [CppToPas(Classe.Name + ' *'), ProcNameInObject, EndChar]))
|
||||||
|
else if IsDestructor then
|
||||||
|
Add(Format('destructor %s.%s%s', [CppToPas(Classe.Name + ' *'), ProcNameInObject, EndChar]))
|
||||||
|
else
|
||||||
|
Add(Format('procedure %s.%s%s', [CppToPas(Classe.Name + ' *'), ProcName, EndChar]));
|
||||||
|
end
|
||||||
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;
|
||||||
|
|||||||
Reference in New Issue
Block a user