mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-16 17:49:14 +02:00
codetools: h2p: fixed creating nested procedure types
git-svn-id: trunk@14658 -
This commit is contained in:
parent
66c97d67f0
commit
ab2e97512f
@ -1931,6 +1931,10 @@ end;
|
||||
|
||||
function TCCodeParserTool.NodeAsString(Node: TCodeTreeNode): string;
|
||||
begin
|
||||
if Node=nil then begin
|
||||
Result:='nil';
|
||||
exit;
|
||||
end;
|
||||
case Node.Desc of
|
||||
ccnName: Result:=copy(Src,Node.StartPos,Node.EndPos-Node.StartPos);
|
||||
else Result:='';
|
||||
|
@ -731,7 +731,10 @@ end;
|
||||
|
||||
function TCodeTreeNode.DescAsString: string;
|
||||
begin
|
||||
Result:=NodeDescriptionAsString(Desc);
|
||||
if Self=nil then
|
||||
Result:='nil'
|
||||
else
|
||||
Result:=NodeDescriptionAsString(Desc);
|
||||
end;
|
||||
|
||||
function TCodeTreeNode.GetRoot: TCodeTreeNode;
|
||||
|
@ -73,7 +73,7 @@ int bafprintf(FILE *stream, const char *format, ...);
|
||||
int basprintf(char *str, const char *format, ...);
|
||||
int basnprintf(char *str, size_t size, const char *format, ...);
|
||||
int hci_send_req(int dd, struct hci_request *req, int timeout); // implicit struct
|
||||
int hci_for_each_dev(int flag, int(*func)(int dd, int dev_id, long arg), long arg); // implicit function type
|
||||
int hci_for_each_dev(int flag, int(*func)(int dd2, int dev_id, long arg1), long arg2); // implicit function type
|
||||
|
||||
void *bt_malloc(size_t size);
|
||||
void bt_free(void *ptr);
|
||||
|
@ -614,7 +614,7 @@ begin
|
||||
// create proc type
|
||||
ParamsNode:=CTool.GetFunctionParamListNode(CNode);
|
||||
SubTypeName:=CreatePascalNameFromCCode(CurName+CTool.ExtractFunctionParamList(CNode));
|
||||
TypeH2PNode:=CreateH2PNode(SubTypeName,'',nil,ctnProcedureType,SimpleType,
|
||||
TypeH2PNode:=CreateH2PNode(SubTypeName,'',ParamsNode,ctnProcedureType,SimpleType,
|
||||
nil,true);
|
||||
DebugLn(['TH2PasTool.ConvertFunction function type added: ',TypeH2PNode.DescAsString(CTool)]);
|
||||
// create variable
|
||||
|
Loading…
Reference in New Issue
Block a user