소스 검색

ERR: Fix for borland in generated code. vtkCommand is ambiguously both a function and a class.

Brad King 23 년 전
부모
커밋
a4eebcb5b1
1개의 변경된 파일5개의 추가작업 그리고 1개의 파일을 삭제
  1. 5 1
      Source/cmVTKWrapTclCommand.cxx

+ 5 - 1
Source/cmVTKWrapTclCommand.cxx

@@ -249,6 +249,10 @@ bool cmVTKWrapTclCommand::WriteInit(const char *kitName,
     fprintf(fout,"\nTcl_HashTable vtkInstanceLookup;\n");
     fprintf(fout,"\nTcl_HashTable vtkInstanceLookup;\n");
     fprintf(fout,"Tcl_HashTable vtkPointerLookup;\n");
     fprintf(fout,"Tcl_HashTable vtkPointerLookup;\n");
     fprintf(fout,"Tcl_HashTable vtkCommandLookup;\n");
     fprintf(fout,"Tcl_HashTable vtkCommandLookup;\n");
+    fprintf(fout,"int vtkCommandForward(ClientData cd, Tcl_Interp *interp,\n"
+                 "                      int argc, char *argv[]){\n"
+                 "  return vtkCommand(cd, interp, argc, argv);\n"
+                 "}\n");
     }
     }
   else
   else
     {
     {
@@ -308,7 +312,7 @@ bool cmVTKWrapTclCommand::WriteInit(const char *kitName,
 
 
     /* create special vtkCommand command */
     /* create special vtkCommand command */
     fprintf(fout,"  Tcl_CreateCommand(interp,(char *) \"vtkCommand\",\n"
     fprintf(fout,"  Tcl_CreateCommand(interp,(char *) \"vtkCommand\",\n"
-                 "                    reinterpret_cast<vtkTclCommandType>(vtkCommand),\n"
+                 "                    reinterpret_cast<vtkTclCommandType>(vtkCommandForward),\n"
                  "                    (ClientData *)NULL, NULL);\n\n");
                  "                    (ClientData *)NULL, NULL);\n\n");
     }
     }