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:
parent
5fe3427682
commit
8e3e5bd0ce
1 changed files with 4 additions and 3 deletions
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue