code: def model_macros(vk, model):
      
      model['macros'] = {}
  
      # API Macros
      macros = [x for x in vk['registry']['enums']
                if x.get('@type') not in ('bitmask', 'enum')]
  
      # TODO: Check theses values
      special_values = {'1000.0f': '1000.0',
                        '(~0U)': 0xffffffff,
                        '(~0ULL)': -1,
                        '(~0U-1)': 0xfffffffe,
                        '(~0U-2)': 0xfffffffd}
  
      for macro in macros[0]['enum']:
          if '@name' not in macro or '@value' not in macro:
              continue
  
          name = macro['@name']
          value = macro['@value']
  
          if value in special_values:
                  value = special_values[value]
  
          model['macros'][name] = value
  
      # Extension Macros
      for ext in get_extensions_filtered(vk):
          model['macros'][ext['@name']] = 1
          for req in ext['require']:
              for enum in req['enum']:
                  ename = enum['@name']
                  evalue = parse_constant(enum, int(ext['@number']))
  
                  if enum.get('@extends') == 'VkResult':
                      model['enums']['VkResult'][ename] = evalue
                  else:
                      model['macros'][ename] = evalue
docs: Fill the model with macros
  
      model['macros'] = {'name': value, ...}