Sun Workshop warning fixes
Use new not malloc in C++ code git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6147 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
d17ee6f927
commit
6207f1615e
1 changed files with 4 additions and 3 deletions
|
|
@ -16,7 +16,7 @@ public:
|
||||||
static File *f_cl=0;
|
static File *f_cl=0;
|
||||||
static File *f_null=0;
|
static File *f_null=0;
|
||||||
|
|
||||||
char *identifier_converter="identifier-convert-null";
|
const char *identifier_converter="identifier-convert-null";
|
||||||
|
|
||||||
int any_varargs(ParmList *pl) {
|
int any_varargs(ParmList *pl) {
|
||||||
Parm *p;
|
Parm *p;
|
||||||
|
|
@ -206,8 +206,9 @@ void ALLEGROCL :: main(int argc, char *argv[]) {
|
||||||
identifier_converter="identifier-convert-null";
|
identifier_converter="identifier-convert-null";
|
||||||
} else {
|
} else {
|
||||||
/* Must be user defined */
|
/* Must be user defined */
|
||||||
identifier_converter = (char *)malloc(strlen(conv)+1);
|
char *idconv = new char[strlen(conv)+1];
|
||||||
strcpy(identifier_converter, conv);
|
strcpy(idconv, conv);
|
||||||
|
identifier_converter=idconv;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue