Skip to content

Commit 9cb1623

Browse files
committed
Pull request 38
1 parent bf1c1f8 commit 9cb1623

File tree

9 files changed

+588
-255
lines changed

9 files changed

+588
-255
lines changed

PythonForDelphi/Components/PythonVCL_XE2.dpk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ requires
3030
rtl,
3131
vcl,
3232
dbrtl,
33-
bdertl,
33+
// bdertl,
3434
Python_XE2;
3535

3636
contains

PythonForDelphi/Components/Sources/VCL/pyDB.pas

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1630,15 +1630,15 @@ function TPyDataset.Repr : PPyObject;
16301630

16311631
// Sequence services
16321632

1633-
function TPyDataset.SqLength : Integer;
1633+
function TPyDataset.SqLength : NativeInt;
16341634
begin
16351635
if CheckDataset then
16361636
Result := Dataset.RecordCount
16371637
else
16381638
Result := -1;
16391639
end;
16401640

1641-
function TPyDataset.SqItem( idx : Integer ) : PPyObject;
1641+
function TPyDataset.SqItem( idx : NativeInt ) : PPyObject;
16421642
begin
16431643
if CheckDataset then
16441644
begin

PythonForDelphi/Components/Sources/VCL/pyDBTables.pas

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@ TPyBDEDataset = class(TPyDataset)
6868
procedure OnUpdateRecord( Dataset : TDataset; UpdateKind: TUpdateKind; var ua:TUpdateAction);
6969
end;
7070

71-
7271
{*********************************************************************
7372
* Interface of TDBDataset *
7473
*********************************************************************}
@@ -97,7 +96,6 @@ TPyDBDataset = class(TPyBDEDataset)
9796
{*********************************************************************
9897
* Interface of TTable *
9998
*********************************************************************}
100-
10199
TPyTable = class(TPyDBDataset)
102100

103101
// Constructors & Destructors
@@ -1742,5 +1740,7 @@ procedure CreateComponents( AOwner : TComponent );
17421740
gQueryType := TPythonQuery.Create(AOwner);
17431741
end;
17441742

1743+
{$EndIf}
1744+
{$EndIf}
17451745

17461746
end.
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{ This file was automatically created by Lazarus. Do not edit!
2+
This source is only used to compile and install the package.
3+
}
4+
5+
unit uP4DLaz;
6+
7+
interface
8+
9+
uses
10+
PythonEngine, PythonGUIInputOutput, MethodCallBack, WrapDelphiWindows,
11+
TinyWideStrings, VarPyth, WrapDelphi, WrapDelphiActnList, WrapDelphiButtons,
12+
WrapDelphiClasses, WrapDelphiComCtrls, WrapDelphiControls,
13+
WrapDelphiExtCtrls, WrapDelphiForms, WrapDelphiGraphics, WrapDelphiGrids,
14+
WrapDelphiStdCtrls, WrapDelphiTypes, WrapDelphiVCL, LazarusPackageIntf;
15+
16+
implementation
17+
18+
procedure Register;
19+
begin
20+
RegisterUnit('PythonEngine', @PythonEngine.Register);
21+
RegisterUnit('PythonGUIInputOutput', @PythonGUIInputOutput.Register);
22+
RegisterUnit('WrapDelphi', @WrapDelphi.Register);
23+
RegisterUnit('uP4DLaz', @uP4DLaz.Register);
24+
end;
25+
26+
initialization
27+
RegisterPackage('P4DLaz', @Register);
28+
end.

PythonForDelphi/Demos/Demo10/Example2.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ def PrintDocOf( inst ):
6565
if type(inst).__doc__:
6666
print type(inst).__doc__
6767
print "Methods:"
68-
for i in inst.__methods__:
68+
for i in inst.__members__:
6969
doc = getattr(inst, i).__doc__
7070
if doc:
7171
print " ", doc

0 commit comments

Comments
 (0)