compiler/codegen/symbol.cpp
// Supports the creation of a python module with --library-python
Supports the creation of a python module with --library-python
Supports the creation of a python module with -- library - python
GenRet FnSymbol::codegenPXDType() {
  GenInfo* info = gGenInfo;
  GenRet ret;
  ret.chplType = typeInfo();
  if (info->cfile) {
    std::string str;
    std::string retString = getPythonTypeName(retType, C_PXD);
    str += retString.c_str();
    str += " ";
    str += cname;
    str += "(";
    if (numFormals() != 0) {
      int count = 0;
      for_formals(formal, this) {
        if (formal->hasFlag(FLAG_NO_CODEGEN))
          continue; 
        if (count > 0)
          str += ", ";
        str += formal->getPythonType(C_PXD);
        str += formal->cname;
        if (fGenIDS) {
          str += " ";
          str += idCommentTemp(formal);
        }
        count++;
      }
    } 
    str += ")";
    ret.c = str;
  } else {
  }
  return ret;
}
GenRet FnSymbol :: codegenPXDType ( ) { GenInfo * info = gGenInfo ; GenRet ret ; ret . chplType = typeInfo ( ) ; if ( info -> cfile ) { std :: string str ; std :: string retString = getPythonTypeName ( retType , C_PXD ) ; str += retString . c_str ( ) ; str += " " ; str += cname ; str += " " ; if ( numFormals ( ) != 0 ) { int count = 0 ; for_formals ( formal , this ) { if ( formal -> hasFlag ( FLAG_NO_CODEGEN ) ) continue ; if ( count > 0 ) str += " " ; str += formal -> getPythonType ( C_PXD ) ; str += formal -> cname ; if ( fGenIDS ) { str += " " ; str += idCommentTemp ( formal ) ; } count ++ ; } } str += " " ; ret . c = str ; } else { } return ret ; }
Supports the creation of a python module with --library-python
Supports the creation of a python module with -- library - python
// Cast to right function type. // do not print locale argument, end count, dummy class // pxd files do not take void as an argument list, just close the parens // TODO: LLVM stuff