Skip to content

Commit

Permalink
Fixed issue #2 : TWebUIFileHandlerCallback must return a generic poin…
Browse files Browse the repository at this point in the history
…ter.
  • Loading branch information
salvadordf committed May 20, 2024
1 parent 5cc67af commit b201c2d
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion demos/Delphi_Console/serve_a_folder/serve_a_folder.dpr
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ begin
LSecondWindow.Show('second.html');
end;

function my_files_handler(const filename: PWebUIChar; len: PInteger): PWebUIChar; cdecl;
function my_files_handler(const filename: PWebUIChar; len: PInteger): Pointer; cdecl;
var
LFilename, LResult : string;
begin
Expand Down
2 changes: 1 addition & 1 deletion demos/Delphi_FMX/serve_a_folder/uMainForm.pas
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ procedure TMainForm.show_second_window(const aEvent: IWebUIEventHandler);
FSecondWindow.Show('second.html');
end;

function my_files_handler(const filename: PWebUIChar; len: PInteger): PWebUIChar; cdecl;
function my_files_handler(const filename: PWebUIChar; len: PInteger): Pointer; cdecl;
var
LFilename, LResult : string;
begin
Expand Down
2 changes: 1 addition & 1 deletion demos/Delphi_VCL/serve_a_folder/uMainForm.pas
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ procedure TMainForm.show_second_window(const aEvent: IWebUIEventHandler);
FSecondWindow.Show('second.html');
end;

function my_files_handler(const filename: PWebUIChar; len: PInteger): PWebUIChar; cdecl;
function my_files_handler(const filename: PWebUIChar; len: PInteger): Pointer; cdecl;
var
LFilename, LResult : string;
begin
Expand Down
2 changes: 1 addition & 1 deletion demos/Lazarus_Console/serve_a_folder/serve_a_folder.lpr
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ procedure show_second_window(e: PWebUIEvent); cdecl;
LSecondWindow.Show('second.html');
end;

function my_files_handler(const filename: PWebUIChar; len: PInteger): PWebUIChar; cdecl;
function my_files_handler(const filename: PWebUIChar; len: PInteger): Pointer; cdecl;
var
LFilename, LResult : string;
begin
Expand Down
2 changes: 1 addition & 1 deletion demos/Lazarus_LCL/serve_a_folder/umainform.pas
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ procedure TMainForm.show_second_window(const aEvent: IWebUIEventHandler);
FSecondWindow.Show('second.html');
end;

function my_files_handler(const filename: PWebUIChar; len: PInteger): PWebUIChar; cdecl;
function my_files_handler(const filename: PWebUIChar; len: PInteger): Pointer; cdecl;
var
LFilename, LResult : string;
begin
Expand Down
2 changes: 1 addition & 1 deletion source/uWebUITypes.pas
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ TWebUIEvent = record
PWebUIEvent = ^TWebUIEvent;

TWebUIBindCallback = procedure(e: PWebUIEvent); cdecl;
TWebUIFileHandlerCallback = function(const filename: PWebUIChar; len: PInteger): PWebUIChar; cdecl;
TWebUIFileHandlerCallback = function(const filename: PWebUIChar; len: PInteger): Pointer; cdecl;
TWebUIInterfaceEventCallback = procedure(window : TWebUIWindowID; event_type: TWebUIEventType; const element: PWebUIChar; event_number: TWebUIEventID; bind_id: TWebUIBindID); cdecl;

TOnWebUIEvent = procedure(Sender: TObject; const aEvent: IWebUIEventHandler) of object;
Expand Down

0 comments on commit b201c2d

Please sign in to comment.