From b78bad9945a4af7a3b68cc100cbbc7baf9a91580 Mon Sep 17 00:00:00 2001 From: mescalinum Date: Sun, 2 Oct 2011 17:14:26 +0000 Subject: fix makefile, and the remainings of the c++ -> c conversion svn path=/trunk/externals/loaders/tclpd/; revision=15444 --- tcl_setup.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'tcl_setup.c') 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 #include #include 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); } -- cgit v1.2.1