Minor fixes to enable compiling against TCL8.5
Define USE_NON_CONST so that the newer TCL headers define functions in the same way as pre-8.4 TCL headers. It will be a good idea to change to USE_COMPAT_CONST instead at some point. Also use ckfree() instead of free() to free an allocation returned by TCL.
This commit is contained in:
@@ -16,10 +16,6 @@
|
|||||||
#include "irc.h"
|
#include "irc.h"
|
||||||
#include "irc_std.h"
|
#include "irc_std.h"
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#ifdef WANT_TCL
|
|
||||||
#undef USE_TCLALLOC
|
|
||||||
#include <tcl.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
typedef int comp_len_func (char *, char *, int);
|
typedef int comp_len_func (char *, char *, int);
|
||||||
typedef int comp_func (char *, char *);
|
typedef int comp_func (char *, char *);
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ void tcl_load (char *, char *, char *, char *);
|
|||||||
|
|
||||||
#ifdef WANT_TCL
|
#ifdef WANT_TCL
|
||||||
|
|
||||||
|
#define USE_NON_CONST
|
||||||
#include <tcl.h>
|
#include <tcl.h>
|
||||||
extern Tcl_Interp *tcl_interp;
|
extern Tcl_Interp *tcl_interp;
|
||||||
void check_tcl_tand (char *, char *, char *);
|
void check_tcl_tand (char *, char *, char *);
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ CVS_REVISION(fset_c)
|
|||||||
#include "misc.h"
|
#include "misc.h"
|
||||||
#include "list.h"
|
#include "list.h"
|
||||||
#include "vars.h"
|
#include "vars.h"
|
||||||
|
#include "tcl_bx.h"
|
||||||
#define MAIN_SOURCE
|
#define MAIN_SOURCE
|
||||||
#include "modval.h"
|
#include "modval.h"
|
||||||
|
|
||||||
|
|||||||
@@ -1435,7 +1435,7 @@ struct timeval now1;
|
|||||||
{
|
{
|
||||||
for (i=0; i<argc; i++)
|
for (i=0; i<argc; i++)
|
||||||
Tcl_DStringAppendElement(&ds,argv[i]);
|
Tcl_DStringAppendElement(&ds,argv[i]);
|
||||||
free(argv);
|
ckfree((char *)argv);
|
||||||
code=Tcl_Eval(tcl_interp,Tcl_DStringValue(&ds));
|
code=Tcl_Eval(tcl_interp,Tcl_DStringValue(&ds));
|
||||||
/* code=Tcl_Eval(tcl_interp,mark->cmd); */
|
/* code=Tcl_Eval(tcl_interp,mark->cmd); */
|
||||||
Tcl_DStringFree(&ds);
|
Tcl_DStringFree(&ds);
|
||||||
|
|||||||
Reference in New Issue
Block a user