@@ -66,11 +66,9 @@ def updatePSPLibdoc(nidEntries, xmlFile, version=None):
6666 for library in prx .findall ("LIBRARIES/LIBRARY" ):
6767 libraryName = library .find ("NAME" ).text
6868 libraryList .append (libraryName )
69- nidList = []
70- for (nidtype , funvar ) in [('fun' , x ) for x in library .findall ("FUNCTIONS/FUNCTION" )] + [('var' , x ) for x in library .findall ("VARIABLES/VARIABLE" )]:
69+ for funvar in library .findall ("FUNCTIONS/FUNCTION" ) + library .findall ("VARIABLES/VARIABLE" ):
7170 numTotalFunctions = numTotalFunctions + 1
7271 funvarNID = funvar .find ("NID" ).text .upper ().removeprefix ('0X' )
73- nidList .append ((nidtype , funvarNID ))
7472 funvarName = funvar .find ("NAME" ).text
7573 libDocNidNameUnk = funvarName .upper ().endswith (funvarNID )
7674
@@ -104,10 +102,17 @@ def updatePSPLibdoc(nidEntries, xmlFile, version=None):
104102 if entries [nid ].prx == prxFile and entries [nid ].libraryName not in libraryList :
105103 libs = prx .find ("LIBRARIES" )
106104 lib = ET .SubElement (libs , "LIBRARY" )
107- ET .SubElement (lib , "NAME" ).text = nidEntry .libraryName
108- ET .SubElement (lib , "FLAGS" ).text = nidEntry .libraryFlags
105+ ET .SubElement (lib , "NAME" ).text = entries [nid ].libraryName
106+ ET .SubElement (lib , "FLAGS" ).text = entries [nid ].libraryFlags
107+ libraryList .append (entries [nid ].libraryName )
109108
110109 for library in prx .findall ("LIBRARIES/LIBRARY" ):
110+ libraryName = library .find ("NAME" ).text
111+ nidList = []
112+ for (nidtype , funvar ) in [('fun' , x ) for x in library .findall ("FUNCTIONS/FUNCTION" )] + [('var' , x ) for x in library .findall ("VARIABLES/VARIABLE" )]:
113+ funvarNID = funvar .find ("NID" ).text .upper ().removeprefix ('0X' )
114+ nidList .append ((nidtype , funvarNID ))
115+
111116 for nid in entries :
112117 if entries [nid ].libraryName == libraryName and entries [nid ].prx == prxFile and (entries [nid ].nidtype , nid ) not in nidList :
113118 name = "FUNCTION" if entries [nid ].nidtype == 'fun' else "VARIABLE"
0 commit comments