Skip to content
Tcl Source Code Changes To Migrating C extensions to Tcl 9
Login

Changes To Migrating C extensions to Tcl 9

Changes to "Migrating C extensions to Tcl 9" between 2024-11-11 08:55:21 and 2024-11-11 10:44:05

︙
276
277
278
279
280
281
282





















276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303







+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
```
#if (TCL_MAJOR_VERSION < 9) && ! defined(TCL_THREADS)
#error "build requires TCL_THREADS"
#endif
```

See [TIP491](https://core.tcl-lang.org/tips/doc/trunk/tip/491.md).

### CONST macro

The macro *CONST* is not defined any more by the *tcl.h*.
This was a helper for non ANSI-C compilers.

This was observed on the Windows platform using the MS-VC 2015 compiler and the nmake build system.
This may be different on other platforms or build systems.

Thus, the following snipped must be modified (which defines a function passed to *Tcl_CreateObjCommand*):

```
ZbarAsyncDecodeObjCmd(ClientData clientData, Tcl_Interp *interp, int objc,  Tcl_Obj *CONST objv[])
```

to

```
ZbarAsyncDecodeObjCmd(ClientData clientData, Tcl_Interp *interp, int objc,  Tcl_Obj *const objv[])
```