Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit fc9f417

Browse filesBrowse files
committed
2 parents 8470396 + 6b2cc0e commit fc9f417
Copy full SHA for fc9f417

File tree

3 files changed

+11
-11
lines changed
Filter options

3 files changed

+11
-11
lines changed

‎Source/PythonEngine.pas

Copy file name to clipboardExpand all lines: Source/PythonEngine.pas
+3-3
Original file line numberDiff line numberDiff line change
@@ -2906,9 +2906,9 @@ TPythonThread = class(TThread)
29062906
private class threadvar
29072907
f_savethreadstate: PPyThreadState;
29082908

2909+
protected
29092910
// Do not overwrite Execute! Use ExecuteWithPython instead!
29102911
procedure Execute; override;
2911-
protected
29122912
procedure ExecuteWithPython; virtual; abstract;
29132913
function InterpreterConfig: PyInterpreterConfig; virtual;
29142914
public
@@ -4668,7 +4668,7 @@ procedure TPythonEngine.Initialize;
46684668

46694669
PWSL := PPyWideStringList(PByte(@Config) + ConfigOffests[MinorVersion,
46704670
TConfigFields.module_search_paths]);
4671-
Paths := FPythonPath.Split([PathSep]);
4671+
Paths := string(FPythonPath).Split([PathSep]);
46724672
for I := 0 to Length(Paths) - 1 do
46734673
begin
46744674
if (Paths[I] = '') and (I > 0) then
@@ -9781,7 +9781,7 @@ function StringToWCharTString(Str: string): WcharTString;
97819781
{$IFDEF POSIX}
97829782
Result := UnicodeStringToUCS4String(UnicodeString(Str));
97839783
{$ELSE}
9784-
Result := Str;
9784+
Result := WcharTString(Str);
97859785
{$ENDIF}
97869786
end;
97879787

‎Source/WrapDelphi.pas

Copy file name to clipboardExpand all lines: Source/WrapDelphi.pas
+7-7
Original file line numberDiff line numberDiff line change
@@ -553,16 +553,16 @@ TPyDelphiObject = class (TPyInterfacedObject, IFreeNotificationSubscriber)
553553
class function ExcludedExposedMembers(APythonType: TPythonType): TArray<string>; virtual;
554554
class procedure ExposeMethods(AClass: TClass; NearestAncestorClass: TClass;
555555
APythonType: TPythonType; APyDelphiWrapper: TPyDelphiWrapper;
556-
AExcludedMethodNames: TArray<string> = []);
556+
AExcludedMethodNames: TArray<string> = nil);
557557
class procedure ExposeFields(AClass: TClass; NearestAncestorClass: TClass;
558558
APythonType: TPythonType; APyDelphiWrapper: TPyDelphiWrapper;
559-
AExcludedFieldNames: TArray<string> = []);
559+
AExcludedFieldNames: TArray<string> = nil);
560560
class procedure ExposeProperties(AClass: TClass; NearestAncestorClass: TClass;
561561
APythonType: TPythonType; APyDelphiWrapper: TPyDelphiWrapper;
562-
AExcludedPropertyNames: TArray<string> = []);
562+
AExcludedPropertyNames: TArray<string> = nil);
563563
class procedure ExposeIndexedProperties(AClass: TClass; NearestAncestorClass: TClass;
564564
APythonType: TPythonType; APyDelphiWrapper: TPyDelphiWrapper;
565-
AExcludedPropertyNames: TArray<string> = []);
565+
AExcludedPropertyNames: TArray<string> = nil);
566566
{$ENDIF EXTENDED_RTTI}
567567
public
568568
PyDelphiWrapper : TPyDelphiWrapper;
@@ -4290,7 +4290,7 @@ class procedure TPyDelphiObject.ExposeFields(AClass: TClass;
42904290
if Assigned(PyDocServer) and PyDocServer.Initialized and
42914291
PyDocServer.ReadMemberDocStr(LRttiField, LDocStr)
42924292
then
4293-
LExposedField.DocString := AnsiString(LDocStr);
4293+
LExposedField.DocString := Utf8Encode(LDocStr);
42944294

42954295
// Keep it alive until the Wrapper is Finalized
42964296
APyDelphiWrapper.fExposedMembers.Add(LExposedField);
@@ -4377,7 +4377,7 @@ class procedure TPyDelphiObject.ExposeProperties(AClass: TClass;
43774377
if Assigned(PyDocServer) and PyDocServer.Initialized and
43784378
PyDocServer.ReadMemberDocStr(LRttiProperty, LDocStr)
43794379
then
4380-
LExposedProperty.DocString := AnsiString(LDocStr);
4380+
LExposedProperty.DocString := Utf8Encode(LDocStr);
43814381

43824382
// Keep it alive until the Wrapper is Finalized
43834383
APyDelphiWrapper.fExposedMembers.Add(LExposedProperty);
@@ -4460,7 +4460,7 @@ class procedure TPyDelphiObject.ExposeIndexedProperties(AClass: TClass;
44604460
if Assigned(PyDocServer) and PyDocServer.Initialized and
44614461
PyDocServer.ReadMemberDocStr(LRttiProperty, LDocStr)
44624462
then
4463-
LExposedProperty.DocString := AnsiString(LDocStr);
4463+
LExposedProperty.DocString := Utf8Encode(LDocStr);
44644464

44654465
// Keep it alive until the Wrapper is Finalized
44664466
APyDelphiWrapper.fExposedMembers.Add(LExposedProperty);

‎Source/vcl/WrapVclForms.pas

Copy file name to clipboardExpand all lines: Source/vcl/WrapVclForms.pas
+1-1
Original file line numberDiff line numberDiff line change
@@ -1072,7 +1072,7 @@ class procedure TPyDelphiScreen.RegisterMethods(PythonType: TPythonType);
10721072
'Allows forms to be aligned in the screen.');
10731073
PythonType.AddMethod('Realign', @TPyDelphiScreen.Realign_Wrapper,
10741074
'TScreen.Realign()'#10 +
1075-
'Realigns the screens forms according to their Align properties.');
1075+
'Realigns the screen''s forms according to their Align properties.');
10761076
PythonType.AddMethod('ResetFonts', @TPyDelphiScreen.ResetFonts_Wrapper,
10771077
'TScreen.ResetFonts()'#10 +
10781078
'Reinitializes the fonts listed in the Fonts property.');

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.