mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-17 01:59:18 +02:00
* write class string message table correctly, resolves #14145
git-svn-id: trunk@13440 -
This commit is contained in:
parent
24f2c7c5cc
commit
b4914d063a
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -9212,6 +9212,7 @@ tests/webtbs/tw1412.pp svneol=native#text/plain
|
|||||||
tests/webtbs/tw14134.pp svneol=native#text/plain
|
tests/webtbs/tw14134.pp svneol=native#text/plain
|
||||||
tests/webtbs/tw1414.pp svneol=native#text/plain
|
tests/webtbs/tw1414.pp svneol=native#text/plain
|
||||||
tests/webtbs/tw14143.pp svneol=native#text/plain
|
tests/webtbs/tw14143.pp svneol=native#text/plain
|
||||||
|
tests/webtbs/tw14145.pp svneol=native#text/plain
|
||||||
tests/webtbs/tw14149.pp svneol=native#text/plain
|
tests/webtbs/tw14149.pp svneol=native#text/plain
|
||||||
tests/webtbs/tw14155.pp svneol=native#text/plain
|
tests/webtbs/tw14155.pp svneol=native#text/plain
|
||||||
tests/webtbs/tw1416.pp svneol=native#text/plain
|
tests/webtbs/tw1416.pp svneol=native#text/plain
|
||||||
|
@ -726,7 +726,7 @@ implementation
|
|||||||
len:=length(p^.data.messageinf.str^);
|
len:=length(p^.data.messageinf.str^);
|
||||||
current_asmdata.asmlists[al_globals].concat(tai_const.create_8bit(len));
|
current_asmdata.asmlists[al_globals].concat(tai_const.create_8bit(len));
|
||||||
getmem(ca,len+1);
|
getmem(ca,len+1);
|
||||||
move(p^.data.messageinf.str[1],ca^,len);
|
move(p^.data.messageinf.str^[1],ca^,len);
|
||||||
ca[len]:=#0;
|
ca[len]:=#0;
|
||||||
current_asmdata.asmlists[al_globals].concat(Tai_string.Create_pchar(ca,len));
|
current_asmdata.asmlists[al_globals].concat(Tai_string.Create_pchar(ca,len));
|
||||||
if assigned(p^.r) then
|
if assigned(p^.r) then
|
||||||
|
42
tests/webtbs/tw14145.pp
Normal file
42
tests/webtbs/tw14145.pp
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
{$mode objfpc}
|
||||||
|
program testm;
|
||||||
|
|
||||||
|
uses
|
||||||
|
Strings;
|
||||||
|
|
||||||
|
Type
|
||||||
|
TMyObject = Class(TObject)
|
||||||
|
public
|
||||||
|
Procedure MyMessage(Var Msg); message 'somestring';
|
||||||
|
end;
|
||||||
|
|
||||||
|
TMyMessage = packed record
|
||||||
|
MsgStr : ShortString;
|
||||||
|
Data : Pointer;
|
||||||
|
end;
|
||||||
|
|
||||||
|
Var
|
||||||
|
MyExitCode : Longint;
|
||||||
|
|
||||||
|
Procedure TMyObject.MyMessage(Var Msg);
|
||||||
|
|
||||||
|
begin
|
||||||
|
Writeln('Got Message');
|
||||||
|
MyExitCode:=0;
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
msg : TMyMessage;
|
||||||
|
M : TMyObject;
|
||||||
|
s : shortstring;
|
||||||
|
begin
|
||||||
|
MyExitCode:=1;
|
||||||
|
M:=TMyObject.Create;
|
||||||
|
try
|
||||||
|
msg.MsgStr:='somestring';
|
||||||
|
M.DispatchStr(Msg);
|
||||||
|
finally
|
||||||
|
M.Free;
|
||||||
|
end;
|
||||||
|
halt(MyExitCode);
|
||||||
|
end.
|
Loading…
Reference in New Issue
Block a user