diff options
author | mescalinum <mescalinum@users.sourceforge.net> | 2011-10-02 17:14:26 +0000 |
---|---|---|
committer | mescalinum <mescalinum@users.sourceforge.net> | 2011-10-02 17:14:26 +0000 |
commit | b78bad9945a4af7a3b68cc100cbbc7baf9a91580 (patch) | |
tree | f2c9003806b59f8ef61e7b6c1da7ceec64f91c58 /tcl_setup.c | |
parent | 44f29524444a96d9e40a76f48750f17e2fdc2974 (diff) |
fix makefile, and the remainings of the c++ -> c conversion
svn path=/trunk/externals/loaders/tclpd/; revision=15444
Diffstat (limited to 'tcl_setup.c')
-rw-r--r-- | tcl_setup.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/tcl_setup.c b/tcl_setup.c index 51f82c2..72ffa90 100644 --- a/tcl_setup.c +++ b/tcl_setup.c @@ -1,10 +1,11 @@ #include "tcl_extras.h" +#include <stdlib.h> #include <unistd.h> #include <limits.h> Tcl_Interp *tcl_for_pd = NULL; -extern "C" void tcl_setup(void) { +extern void tcl_setup(void) { tclpd_setup(); } @@ -21,8 +22,8 @@ void tclpd_setup(void) { Tcl_Init(tcl_for_pd); Tclpd_SafeInit(tcl_for_pd); - char *dirname = new char[PATH_MAX]; - char *dirresult = new char[PATH_MAX]; + char *dirname = (char*)malloc(PATH_MAX); + char *dirresult = (char*)malloc(PATH_MAX); /* nameresult is only a pointer in dirresult space so don't delete[] it. */ char *nameresult; if(getcwd(dirname, PATH_MAX) < 0) { @@ -52,8 +53,8 @@ void tclpd_setup(void) { post("Tcl loader: loaded ~/.pd.tcl"); } - delete[] dirresult; - delete[] dirname; + free(dirresult); + free(dirname); sys_register_loader(tclpd_do_load_lib); } |