Commit ef817e61 authored by David Cole's avatar David Cole
Browse files

ENH: Merge changes from main tree into VTK-5-2 branch. (cvs -q up -j1.64...

ENH: Merge changes from main tree into VTK-5-2 branch. (cvs -q up -j1.64 -j1.65 Wrapping/vtkWrapTcl.c)
parent d65f2614
......@@ -317,7 +317,7 @@ void use_hints(FILE *fp)
fprintf(fp,INDENT " }\n");
fprintf(fp,INDENT "else\n");
fprintf(fp,INDENT " {\n");
fprintf(fp,INDENT " Tcl_SetResult(interp, (char *)(\"\"), TCL_VOLATILE);\n");
fprintf(fp,INDENT " Tcl_SetResult(interp, const_cast<char *>(\"\"), TCL_VOLATILE);\n");
fprintf(fp,INDENT " }\n");
#undef INDENT
......@@ -469,7 +469,7 @@ void return_result(FILE *fp)
use_hints(fp);
break;
default:
fprintf(fp," Tcl_SetResult(interp, (char *)(\"unable to return result.\"), TCL_VOLATILE);\n");
fprintf(fp," Tcl_SetResult(interp, const_cast<char *>(\"unable to return result.\"), TCL_VOLATILE);\n");
break;
}
}
......@@ -547,7 +547,7 @@ void get_args(FILE *fp, int i)
break;
case 0x109:
case 0x309:
fprintf(fp," temp%i = (%s *)(vtkTclGetPointerFromObject(argv[%i],(char *)(\"%s\"),interp,error));\n",i,currentFunction->ArgClasses[i],start_arg,
fprintf(fp," temp%i = (%s *)(vtkTclGetPointerFromObject(argv[%i],const_cast<char *>(\"%s\"),interp,error));\n",i,currentFunction->ArgClasses[i],start_arg,
currentFunction->ArgClasses[i]);
break;
case 0x2:
......@@ -833,7 +833,7 @@ void vtkParseOutput(FILE *fp, FileInfo *data)
fprintf(fp," tempd = 0; tempd = tempd;\n");
fprintf(fp," temps[0] = 0; temps[0] = temps[0];\n\n");
fprintf(fp," if (argc < 2)\n {\n Tcl_SetResult(interp,(char *)(\"Could not find requested method.\"), TCL_VOLATILE);\n return TCL_ERROR;\n }\n");
fprintf(fp," if (argc < 2)\n {\n Tcl_SetResult(interp,const_cast<char *>(\"Could not find requested method.\"), TCL_VOLATILE);\n return TCL_ERROR;\n }\n");
/* stick in the typecasting and delete functionality here */
fprintf(fp," if (!interp)\n {\n");
......@@ -857,7 +857,7 @@ void vtkParseOutput(FILE *fp, FileInfo *data)
{
fprintf(fp," if (!strcmp(\"GetSuperClassName\",argv[1]))\n");
fprintf(fp," {\n");
fprintf(fp," Tcl_SetResult(interp,(char *)(\"%s\"), TCL_VOLATILE);\n",data->SuperClasses[0]);
fprintf(fp," Tcl_SetResult(interp,const_cast<char *>(\"%s\"), TCL_VOLATILE);\n",data->SuperClasses[0]);
fprintf(fp," return TCL_OK;\n");
fprintf(fp," }\n\n");
}
......@@ -931,7 +931,7 @@ void vtkParseOutput(FILE *fp, FileInfo *data)
/* add the DescribeMethods method */
fprintf(fp,"\n if (!strcmp(\"DescribeMethods\",argv[1]))\n {\n");
fprintf(fp," if(argc>3) {\n" );
fprintf(fp," Tcl_SetResult ( interp, (char*)\"Wrong number of arguments: object DescribeMethods <MethodName>\", TCL_VOLATILE ); \n" );
fprintf(fp," Tcl_SetResult ( interp, const_cast<char*>(\"Wrong number of arguments: object DescribeMethods <MethodName>\"), TCL_VOLATILE ); \n" );
fprintf(fp," return TCL_ERROR;\n }\n" );
fprintf(fp," if(argc==2) {\n" );
......@@ -1087,7 +1087,7 @@ void vtkParseOutput(FILE *fp, FileInfo *data)
}
}
/* Didn't find anything, return an error */
fprintf(fp," Tcl_SetResult ( interp, (char*)\"Could not find method\", TCL_VOLATILE ); \n" );
fprintf(fp," Tcl_SetResult ( interp, const_cast<char*>(\"Could not find method\"), TCL_VOLATILE ); \n" );
fprintf(fp," return TCL_ERROR;\n" );
fprintf(fp," }\n" );
fprintf(fp," }\n" );
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment