generic

Clone Tools
  • last updated 20 hours ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Fixed warnings detected with branch "disabletcl8api"

The Tcl9 native interface is based on "Tcl_Size" instead of "int", but

the default mode hides these differences via some macro-magic. Typical

such cases are API calls like:

Tcl_ListObjLength(interp, methodObj, &length);

Tcl_ListObjGetElements(interp, methodObj, &oc, &ov)

The macro-magic queries the size of the provided parameters and uses

the old or new interface depending on it (while hiding some more

potential problems, a compiler can detect). The branch

"disabletcl8api" removes the macro-magic and reveals the potential

problem areas, where the code is still depending on the old 32bit

interface.

This commit fixes such cases and the collateral damage.

Deactivate support of TIP 629 for the time being

When NS_TCL_HAVE_TIP629 (TIP supporting > 2^31 elements in object

vectors) is activated, Tcl defines different objProcs (Tcl_ObjCmdProc

and Tcl_ObjCmdProc2) for the old and new API, where the usage of these

depends on a cmdWrapperProc. Unfortunately, the resolving of these API

calls is performed through the wrapper via CmdWrapperInfo, which is

not exported. We have to think how to resolve these to make this

working as with prior Tcl versions.

Provide support for TIP 627 (Tcl 8.7a6+ and Tcl 9)

TIP 627 introduces support for > 2^31 elements in object vectors

(e.g., number of words in a single Tcl command). For details, see

https://core.tcl-lang.org/tips/doc/trunk/tip/627.md

To provide also backwards compatibility, this change uses the macros

TCL_COMMAND_OBJPROC, TCL_CREATEOBJCOMMAND, TCL_NRCALLOBJPROC,

TCL_NRCREATECOMMAND, TCL_OBJCMDPROC_T, and TCL_OBJC_T.

  1. … 7 more files in changeset.
updated copyright notice

improve spelling

  1. … 8 more files in changeset.
New feature: added support for return value checker for nsf::proc

One can now specify "-returns ...." in nsf::proc commands the same way

as in nx/XOTcl2 methods.

nsf::proc ... /procName/ /arguments/ ?-returns /valueconstraint/? /body/

When return value checkers are defined, these are returned by the

usual introspection interface.

% nsf::proc ::foo {-a:integer} -returns integer {return 1}

% nsf::cmd::info definition ::foo

::nsf::proc ::foo -a:integer -returns integer {return 1}

% nsf::cmd::info returns ::foo

integer

The regression test was extended to cover these cases.

  1. … 3 more files in changeset.
extend Tcl9 compatibility

Fix bug, where Tcl's "string is" checker modified result, when used as a return value checker

The new code saves and restores the original result value.

The regression test was extended.

Many thanks to Antonio Pisano for pointing out this issue.

  1. … 1 more file in changeset.
generalize handling of isTYPE calls by defining CHARTTYPE

The macro was developed earlier on NaviServer, and is used

in nsf for "upper", "space" and "alpha" character checkers

Provide an initializer for the new size_t field of Tcl_ObjType (Tcl 9)

removed TCL_OUT_LINE_COMPILE, which is removed in Tcl 9.0 (many thanks to Jan Nijtmans)

reduce warnings for other compilers

reduce warnings for clang

clang has no "-Wmaybe-uninitialized" flag

address the maybe-uninitialized warnings

I do not really like the approach based on pragmas, but i do even

less like the warnings, when compiled with -pedantic

reduced compiler warnings when compiling against Tcl 8.6* with TIDY settings

Deactive block for double-checking chached data for Tcl commands

Leave the code for potential future debugging purposes

minor polishing

fix comment

fix compilation hickups for Tcl 8.5

reduce warnings from redefined constants

fix typo

improve compatibility with core-8 branch

fix for Tcl versions having Tcl_LibraryInitProc() already defined (core-8)

provde compatibility for core-8-7-a3

fix compatibility with earlier versions of Tcl 8.7

Improve cleanness of compilation under gcc-11+ and "-pedantic" + -Wextra"

Added support for compiling with Tcl 9.0 (Many Thanks to Jan Nijtmans for first steps)

This version compiles cleanly at least with Tcl 8.6.* and Tcl 9.0 (fossil trunk),

having -pedantic and -Wextra defined.

    • -0
    • +368
    ./stubs9.0/nsfDecls.h
    • -0
    • +89
    ./stubs9.0/nsfIntDecls.h
    • -0
    • +130
    ./stubs9.0/nsfStubInit.c
  1. … 6 more files in changeset.
cleanup: avoid memory leak in cases the Tcl_DictObjPut fails

added option "-asdict" to nsf::parseargs

The new option makes it easier to process the parsed argument in different

contexts

  1. … 1 more file in changeset.
Bug fix: include alias to object in "info methods -path"

Previously, it was not possible to define an alias to an object for

NaviServer, since it was not returned by "info methods -path" and

was therefore not included in the blueprint.

Extended regression test.

  1. … 4 more files in changeset.