Skip to content

Commit be074ad

Browse files
Address TCL 8->9 API change
1 parent cc77ed1 commit be074ad

File tree

3 files changed

+11
-4
lines changed

3 files changed

+11
-4
lines changed

include/cairo_base.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,7 @@ namespace ecolab
381381
/// generic configure function, given a particular \a configSpecs
382382
int configureCairoItem(Tcl_Interp *interp, Tk_Canvas canvas,
383383
Tk_Item *itemPtr, int objc,
384-
Tcl_Obj *CONST objv[],
384+
Tcl_Obj *const objv[],
385385
int flags, Tk_ConfigSpec configSpecs[]);
386386
void ComputeImageBbox(Tk_Canvas canvas, ImageItem *imgPtr);
387387
}
@@ -390,7 +390,7 @@ namespace ecolab
390390
/// creating Tk canvas itemTypes
391391
template <class C>
392392
int createImage(Tcl_Interp *interp, Tk_Canvas canvas, Tk_Item *itemPtr,
393-
int objc,Tcl_Obj *CONST objv[])
393+
int objc,Tcl_Obj *CONST84 objv[])
394394
{
395395
if (TkImageCode::CreateImage(interp,canvas,itemPtr,objc,objv,C::configSpecs)==TCL_OK)
396396
{

include/tcl++.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,10 @@ into a simple I/O stream and tclindex, a simple iterator through a TCL array */
4343

4444
/* for Tcl 8.4 compatibility */
4545
#ifndef CONST84
46-
#define CONST84
46+
#define CONST84 const
47+
#endif
48+
#ifndef CONST
49+
#define CONST const
4750
#endif
4851

4952
#ifdef TK

src/analysis.cc

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,11 @@ int palette_class::size=0;
3838

3939
palette_class::palette_class()
4040
{
41-
int elemc;
41+
#if TCL_MAJOR_VERSION >= 9
42+
Tcl_Size elemc;
43+
#else
44+
int elemc;
45+
#endif
4246

4347
if (size==0)
4448
{

0 commit comments

Comments
 (0)