Sun Workshop warning fixes

Use new not malloc in C++ code


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6147 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2004-08-25 20:45:23 +00:00
commit 8e3e5bd0ce

View file

@ -16,7 +16,7 @@ public:
static File *f_cl=0;
static File *f_null=0;
char *identifier_converter="identifier-convert-null";
const char *identifier_converter="identifier-convert-null";
int any_varargs(ParmList *pl) {
Parm *p;
@ -206,8 +206,9 @@ void ALLEGROCL :: main(int argc, char *argv[]) {
identifier_converter="identifier-convert-null";
} else {
/* Must be user defined */
identifier_converter = (char *)malloc(strlen(conv)+1);
strcpy(identifier_converter, conv);
char *idconv = new char[strlen(conv)+1];
strcpy(idconv, conv);
identifier_converter=idconv;
}
}