ppapi/generators/idl_c_header.py
def CheckTypedefs(filenode, releases):
  """Checks that typedefs don't specify callbacks that take some structs.

  See http://crbug.com/233439 for details.
  """
  cgen = CGen()
  for node in filenode.GetListOf('Typedef'):
    build_list = node.GetUniqueReleases(releases)
    callnode = node.GetOneOf('Callspec')
    if callnode:
      for param in callnode.GetListOf('Param'):
        if param.GetListOf('Array'):
          continue
        if cgen.GetParamMode(param) != 'in':
          continue
        t = param.GetType(build_list[0])
        while t.IsA('Typedef'):
          t = t.GetType(build_list[0])
        if t.IsA('Struct') and t.GetProperty('passByValue'):
          raise Exception('%s is a struct in callback %s. '
                          'See http://crbug.com/233439' %
                          (t.GetName(), node.GetName()))
Checks that typedefs don't specify callbacks that take some structs.

  See http://crbug.com/233439 for details.
  
Checks that typedefs don't specify callbacks that take some structs.
Checks that typedefs don ' t specify callbacks that take some structs .
def CheckTypedefs(filenode, releases):
  cgen = CGen()
  for node in filenode.GetListOf('Typedef'):
    build_list = node.GetUniqueReleases(releases)
    callnode = node.GetOneOf('Callspec')
    if callnode:
      for param in callnode.GetListOf('Param'):
        if param.GetListOf('Array'):
          continue
        if cgen.GetParamMode(param) != 'in':
          continue
        t = param.GetType(build_list[0])
        while t.IsA('Typedef'):
          t = t.GetType(build_list[0])
        if t.IsA('Struct') and t.GetProperty('passByValue'):
          raise Exception('%s is a struct in callback %s. '
                          'See http://crbug.com/233439' %
                          (t.GetName(), node.GetName()))
def CheckTypedefs ( filenode , releases ) : cgen = CGen ( ) for node in filenode . GetListOf ( 'Typedef' ) : build_list = node . GetUniqueReleases ( releases ) callnode = node . GetOneOf ( 'Callspec' ) if callnode : for param in callnode . GetListOf ( 'Param' ) : if param . GetListOf ( 'Array' ) : continue if cgen . GetParamMode ( param ) != 'in' : continue t = param . GetType ( build_list [ 0 ] ) while t . IsA ( 'Typedef' ) : t = t . GetType ( build_list [ 0 ] ) if t . IsA ( 'Struct' ) and t . GetProperty ( 'passByValue' ) : raise Exception ( '%s is a struct in callback %s. ' 'See http://crbug.com/233439' % ( t . GetName ( ) , node . GetName ( ) ) )
Checks that typedefs don't specify callbacks that take some structs.
Checks that typedefs don ' t specify callbacks that take some structs .
"""Checks that typedefs don't specify callbacks that take some structs.

  See http://crbug.com/233439 for details.
  """
filenode
releases