mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-11 13:28:04 +02:00
Merge branch 'gir2pas' into 'main'
gir2pas: Fixed generation of types based on int32 standard C type. See merge request freepascal.org/lazarus/lazarus!209
This commit is contained in:
commit
127e7afbec
@ -55,7 +55,7 @@ type
|
||||
{ TFT_Int32 }
|
||||
PPFT_Int32 = ^PFT_Int32;
|
||||
PFT_Int32 = ^TFT_Int32;
|
||||
TFT_Int32 = int32;
|
||||
TFT_Int32 = cint32;
|
||||
|
||||
procedure FT_Library_Version; cdecl; external;
|
||||
implementation
|
||||
|
@ -23,7 +23,7 @@ unit girCTypesMapping;
|
||||
interface
|
||||
|
||||
const
|
||||
CTypesMax = 34;
|
||||
CTypesMax = 35;
|
||||
var
|
||||
|
||||
TypesPascalCTypes: array [0..CTypesMax-1] of string =
|
||||
@ -50,6 +50,7 @@ var
|
||||
'byte',
|
||||
'Boolean32',
|
||||
'PtrInt',
|
||||
'cint32',
|
||||
'csize_t',
|
||||
'gpointer',
|
||||
'cfloat',
|
||||
@ -88,6 +89,7 @@ var
|
||||
'guchar',
|
||||
'gboolean',
|
||||
'gssize',
|
||||
'int32',
|
||||
'size_t' ,
|
||||
'gconstpointer',
|
||||
'gfloat',
|
||||
|
@ -806,7 +806,11 @@ begin
|
||||
BaseType := TGirBaseType(NameSpace.Types.Items[i]);
|
||||
if BaseType.InheritsFrom(TgirFuzzyType) and (FuzzyType.ResolvedType = nil) then
|
||||
begin
|
||||
CTypesType := LookupGTypeToCType(FuzzyType.CType);
|
||||
if FuzzyType.CType = '' then begin
|
||||
CTypesType := LookupGTypeToCType(FuzzyType.Name);
|
||||
end else begin
|
||||
CTypesType := LookupGTypeToCType(FuzzyType.CType);
|
||||
end;
|
||||
if CTypesType <> '' then
|
||||
begin
|
||||
FuzzyType.TranslatedName:= CTypesType;
|
||||
|
Loading…
Reference in New Issue
Block a user