mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-20 04:59:26 +02:00
* reverted r12690 and r12691
* but extended ptconst so that a com interface maybe assigned to a TGuid const git-svn-id: trunk@12692 -
This commit is contained in:
parent
7f2c77a407
commit
0f519439b5
@ -500,7 +500,7 @@ implementation
|
||||
objectdef :
|
||||
begin
|
||||
{ corba interface -> id string }
|
||||
if is_interfacecorba(def_from) or is_interfacecom(def_from) then
|
||||
if is_interfacecorba(def_from) then
|
||||
begin
|
||||
doconv:=tc_intf_2_string;
|
||||
eq:=te_convert_l1;
|
||||
|
@ -996,8 +996,26 @@ implementation
|
||||
is_packed: boolean;
|
||||
begin
|
||||
{ GUID }
|
||||
if (def=rec_tguid) and
|
||||
((token=_CSTRING) or (token=_CCHAR) or (token=_ID)) then
|
||||
if (def=rec_tguid) and (token=_ID) then
|
||||
begin
|
||||
n:=comp_expr(true);
|
||||
inserttypeconv(n,rec_tguid);
|
||||
if n.nodetype=guidconstn then
|
||||
begin
|
||||
tmpguid:=tguidconstnode(n).value;
|
||||
list.concat(Tai_const.Create_32bit(longint(tmpguid.D1)));
|
||||
list.concat(Tai_const.Create_16bit(tmpguid.D2));
|
||||
list.concat(Tai_const.Create_16bit(tmpguid.D3));
|
||||
for i:=Low(tmpguid.D4) to High(tmpguid.D4) do
|
||||
list.concat(Tai_const.Create_8bit(tmpguid.D4[i]));
|
||||
end
|
||||
else
|
||||
Message(parser_e_illegal_expression);
|
||||
n.free;
|
||||
exit;
|
||||
end;
|
||||
if (def=rec_tguid) and { maybe keep token=_ID here to assign corba interfaces to TGuid }
|
||||
((token=_CSTRING) or (token=_CCHAR) {or (token=_ID)}) then
|
||||
begin
|
||||
n:=comp_expr(true);
|
||||
inserttypeconv(n,cshortstringtype);
|
||||
|
@ -676,10 +676,10 @@
|
||||
Result := getcorbainterfacebyentry(self, getinterfaceentrybystr(iidstr), obj);
|
||||
end;
|
||||
|
||||
{function TObject.getinterface(const iidstr : string;out obj) : boolean;
|
||||
function TObject.getinterface(const iidstr : string;out obj) : boolean;
|
||||
begin
|
||||
Result := getinterfacebystr(iidstr,obj);
|
||||
end;}
|
||||
end;
|
||||
|
||||
class function TObject.getinterfaceentry(const iid : tguid) : pinterfaceentry;
|
||||
var
|
||||
|
@ -209,7 +209,7 @@
|
||||
|
||||
{ interface functions }
|
||||
function GetInterface(const iid : tguid; out obj) : boolean;
|
||||
//function GetInterface(const iidstr : string;out obj) : boolean;
|
||||
function GetInterface(const iidstr : string;out obj) : boolean;
|
||||
function GetInterfaceByStr(const iidstr : string; out obj) : boolean;
|
||||
class function GetInterfaceEntry(const iid : tguid) : pinterfaceentry;
|
||||
class function GetInterfaceEntryByStr(const iidstr : string) : pinterfaceentry;
|
||||
|
Loading…
Reference in New Issue
Block a user