original_docstring: Converts a C type name to the corresponding Pepper IDL type.
docstring: Converts a C type name to the corresponding Pepper IDL type.
docstring_tokens: Converts a C type name to the corresponding Pepper IDL type .
code: def MapCTypeToPepperIdlType(self, ctype, is_for_return_type=False):
      """Converts a C type name to the corresponding Pepper IDL type."""
      idltype = {
          'char*': '[out] str_t',
          'const GLchar* const*': '[out] cstr_t',
          'const char*': 'cstr_t',
          'const void*': 'mem_t',
          'void*': '[out] mem_t',
          'void**': '[out] mem_ptr_t',
      }.get(ctype, ctype)
      # We use "GLxxx_ptr_t" for "GLxxx*".
      matched = re.match(r'(const )?(GL\w+)\*$', ctype)
      if matched:
        idltype = matched.group(2) + '_ptr_t'
        if not matched.group(1):
          idltype = '[out] ' + idltype
      # If an in/out specifier is not specified yet, prepend [in].
      if idltype[0] != '[':
        idltype = '[in] ' + idltype
      # Strip the in/out specifier for a return type.
      if is_for_return_type:
        idltype = re.sub(r'\[\w+\] ', '', idltype)
      return idltype
code_tokens: def MapCTypeToPepperIdlType ( self , ctype , is_for_return_type = False ) : idltype = { 'char*' : '[out] str_t' , 'const GLchar* const*' : '[out] cstr_t' , 'const char*' : 'cstr_t' , 'const void*' : 'mem_t' , 'void*' : '[out] mem_t' , 'void**' : '[out] mem_ptr_t' , } . get ( ctype , ctype ) matched = re . match ( r'(const )?(GL\w+)\*$' , ctype ) if matched : idltype = matched . group ( 2 ) + '_ptr_t' if not matched . group ( 1 ) : idltype = '[out] ' + idltype if idltype [ 0 ] != '[' : idltype = '[in] ' + idltype if is_for_return_type : idltype = re . sub ( r'\[\w+\] ' , '' , idltype ) return idltype
short_docstring: Converts a C type name to the corresponding Pepper IDL type.
short_docstring_tokens: Converts a C type name to the corresponding Pepper IDL type .
comment: """Converts a C type name to the corresponding Pepper IDL type."""$SEP$# We use "GLxxx_ptr_t" for "GLxxx*".$SEP$# If an in/out specifier is not specified yet, prepend [in].$SEP$# Strip the in/out specifier for a return type.