Skip to content

Commit 7b5693c

Browse files
author
pyscripter
committed
Warnings removed
1 parent ea16244 commit 7b5693c

File tree

5 files changed

+16
-10
lines changed

5 files changed

+16
-10
lines changed

PythonForDelphi/Components/Python_XE2.dpk

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package Python_XE2;
22

33
{$R *.res}
44
{$R 'Sources\Core\PythonEngine.dcr'}
5+
{$IFDEF IMPLICITBUILDING This IFDEF should not be used by users}
56
{$ALIGN 8}
67
{$ASSERTIONS ON}
78
{$BOOLEVAL OFF}
@@ -12,17 +13,19 @@ package Python_XE2;
1213
{$LOCALSYMBOLS ON}
1314
{$LONGSTRINGS ON}
1415
{$OPENSTRINGS ON}
15-
{$OPTIMIZATION ON}
16+
{$OPTIMIZATION OFF}
1617
{$OVERFLOWCHECKS OFF}
1718
{$RANGECHECKS OFF}
1819
{$REFERENCEINFO ON}
1920
{$SAFEDIVIDE OFF}
20-
{$STACKFRAMES OFF}
21+
{$STACKFRAMES ON}
2122
{$TYPEDADDRESS OFF}
2223
{$VARSTRINGCHECKS ON}
2324
{$WRITEABLECONST OFF}
2425
{$MINENUMSIZE 1}
2526
{$IMAGEBASE $400000}
27+
{$DEFINE DEBUG}
28+
{$ENDIF IMPLICITBUILDING}
2629
{$DESCRIPTION 'Components for Python'}
2730
{$IMPLICITBUILD OFF}
2831

PythonForDelphi/Components/Sources/Core/Definition.Inc

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -275,10 +275,6 @@
275275
// Misc
276276
/////////////////////////////////////////////////////////////////////////////
277277

278-
{$IFDEF DELPHIXE2_OR_HIGHER}
279-
{$DEFINE USESYSTEMDISPINVOKE} //Might work with earlier versions as well
280-
{$ENDIF}
281-
282278
{$IFDEF WIN32}
283279
{$DEFINE CPUX86}
284280
{$ENDIF}
@@ -291,9 +287,6 @@
291287
{$IFDEF CPU32}
292288
{$DEFINE CPUX86}
293289
{$ENDIF CPU32}
294-
{$IF DEFINED(FPC_VER) and (FPC_VER >= 5)}
295-
{$DEFINE USESYSTEMDISPINVOKE}
296-
{$IFEND}
297290
{$IFDEF DARWIN}
298291
{$DEFINE MACOS}
299292
{$DEFINE ALIGN_STACK}

PythonForDelphi/Components/Sources/Core/PythonEngine.pas

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ interface
108108
{$IFEND}
109109
PNativeInt = ^NativeInt;
110110
{$ELSE}
111-
{$IF DEFINED(FPC_VER) and (FPC_VER >= 5)}
111+
{$IF DEFINED(FPC_FULLVERSION) and (FPC_FULLVERSION >= 20500)}
112112
{$ELSE}
113113
NativeInt = integer;
114114
NativeUInt = Cardinal;
@@ -2074,6 +2074,7 @@ TEngineClient = class;
20742074

20752075

20762076
TTracebackItem = class
2077+
public
20772078
FileName : String;
20782079
LineNo : Integer;
20792080
Context : String;
@@ -2969,6 +2970,7 @@ TPythonDelphiVar = class( TEngineClient )
29692970
end;
29702971

29712972
TPyVar = class(TPyObject)
2973+
public
29722974
dv_var : Variant;
29732975
dv_component : TPythonDelphiVar;
29742976
dv_object : PPyObject;

PythonForDelphi/Components/Sources/Core/VarPyth.pas

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,13 @@ TNamedParamDesc = record
120120
end;
121121
TNamedParamArray = array of TNamedParamDesc;
122122

123+
{$IFDEF DELPHIXE2_OR_HIGHER}
124+
{$DEFINE USESYSTEMDISPINVOKE} //Delphi 2010 DispInvoke is buggy
125+
{$ENDIF}
126+
{$IF DEFINED(FPC_FULLVERSION) and (FPC_FULLVERSION >= 20500)}
127+
{$DEFINE USESYSTEMDISPINVOKE}
128+
{$IFEND}
129+
123130
{ Python variant type handler }
124131
TPythonVariantType = class(TInvokeableVariantType, IVarInstanceReference)
125132
protected

PythonForDelphi/Components/Sources/Core/WrapDelphi.pas

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1118,6 +1118,7 @@ function Abort_Wrapper(pself, args: PPyObject): PPyObject; cdecl;
11181118
Type
11191119
// Used for class registration by TPyDelphiWrapper fClassRegister
11201120
TRegisteredClass = class
1121+
public
11211122
DelphiClass : TClass;
11221123
PythonType : TPythonType;
11231124
end;

0 commit comments

Comments
 (0)