Skip to content

Commit c27abf3

Browse files
committed
addDecoratedFunctions: Fix fetching function parameters for ProcGlobal functions
FunctionList requires the full procedure name "proc [IM]" while FunctionInfo requires only "proc". Fix that by passing in the full Procedure struct and using the corresponding elements. Bug present since forever but nobody noticed.
1 parent 902c0ce commit c27abf3

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

procedures/CodeBrowser.ipf

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -328,8 +328,8 @@ Function/S formatDecl(funcOrMacro, params, subtypeTag, returnType)
328328
End
329329

330330
// Adds all kind of information to a list of function in current procedure
331-
Function addDecoratedFunctions(module, procedure, declWave, lineWave)
332-
string module, procedure
331+
Function addDecoratedFunctions(procedure, declWave, lineWave)
332+
STRUCT procedure &procedure
333333
Wave/T declWave
334334
Wave/D lineWave
335335

@@ -341,7 +341,7 @@ Function addDecoratedFunctions(module, procedure, declWave, lineWave)
341341
Wave/T helpWave = getHelpWave()
342342

343343
// list normal, userdefined, override and static functions
344-
options = "KIND:18,WIN:" + procedure
344+
options = "KIND:18,WIN:" + procedure.fullname
345345
funcList = FunctionList("*", ";", options)
346346
numMatches = ItemsInList(funcList)
347347
numEntries = DimSize(declWave, 0)
@@ -350,12 +350,12 @@ Function addDecoratedFunctions(module, procedure, declWave, lineWave)
350350
idx = numEntries
351351
for(i = 0; i < numMatches; i += 1)
352352
func = StringFromList(i, funcList)
353-
fi = FunctionInfo(module + "#" + func, procedure)
353+
fi = FunctionInfo(procedure.module + "#" + func, procedure.name)
354354
if(!cmpstr(func, "Procedures Not Compiled"))
355355
fi = ReplaceNumberByKey("PROCLINE", fi, 0)
356356
endif
357357
if(isEmpty(fi))
358-
debugPrint("macro or other error for " + module + "#" + func)
358+
debugPrint("macro or other error for " + procedure.module + "#" + func)
359359
endif
360360
returnType = interpretParamType(NumberByKey("RETURNTYPE", fi), 0, fi)
361361
threadsafeTag = interpretThreadsafeTag(StringByKey("THREADSAFE", fi))
@@ -715,7 +715,7 @@ Function/S parseProcedure(procedure, [checksumIsCalculated])
715715

716716
// scan and add elements to lists
717717
resetLists(decls, lines, procs, helps)
718-
addDecoratedFunctions(procedure.module, procedure.fullName, decls, lines)
718+
addDecoratedFunctions(procedure, decls, lines)
719719

720720
WAVE/T procContent = getProcedureTextAsWave(procedure.module, procedure.fullName)
721721
addDecoratedConstants(procContent, decls, lines)

0 commit comments

Comments
 (0)