objdictgen/node.py
changeset 659 1041153c5fd2
parent 584 e23359f62023
child 783 376563111c55
equal deleted inserted replaced
658:7758d60e9260 659:1041153c5fd2
   971         mappings = self.GetMappings()
   971         mappings = self.GetMappings()
   972         i = 0
   972         i = 0
   973         while not result and i < len(mappings):
   973         while not result and i < len(mappings):
   974             result = FindEntryInfos(index, mappings[i], compute)
   974             result = FindEntryInfos(index, mappings[i], compute)
   975             i += 1
   975             i += 1
   976         if result == None:
   976         r301 = FindEntryInfos(index, MappingDictionary, compute)
   977             result = FindEntryInfos(index, MappingDictionary, compute)
   977         if r301 :
       
   978             if result is not None:
       
   979                 r301.update(result)
       
   980             return r301
   978         return result
   981         return result
   979     
   982     
   980     def GetSubentryInfos(self, index, subIndex, compute=True):
   983     def GetSubentryInfos(self, index, subIndex, compute=True):
   981         result = None
   984         result = None
   982         mappings = self.GetMappings()
   985         mappings = self.GetMappings()
   984         while not result and i < len(mappings):
   987         while not result and i < len(mappings):
   985             result = FindSubentryInfos(index, subIndex, mappings[i], compute)
   988             result = FindSubentryInfos(index, subIndex, mappings[i], compute)
   986             if result:
   989             if result:
   987                 result["user_defined"] = i == len(mappings) - 1 and index >= 0x1000
   990                 result["user_defined"] = i == len(mappings) - 1 and index >= 0x1000
   988             i += 1
   991             i += 1
   989         if result == None:
   992         r301 = FindSubentryInfos(index, subIndex, MappingDictionary, compute)
   990             result = FindSubentryInfos(index, subIndex, MappingDictionary, compute)
   993         if r301 :
   991             if result:
   994             if result is not None:
   992                 result["user_defined"] = False
   995                 r301.update(result)
       
   996             else:
       
   997                 r301["user_defined"] = False
       
   998             return r301
   993         return result
   999         return result
   994     
  1000     
   995     def GetTypeIndex(self, typename):
  1001     def GetTypeIndex(self, typename):
   996         result = None
  1002         result = None
   997         mappings = self.GetMappings()
  1003         mappings = self.GetMappings()