nsfShadow.c

Clone Tools
  • last updated 9 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.

  1. … 4 more files in changeset.
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. … 21 more files in changeset.
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.

  1. … 20 more files in changeset.
improve regularity and linebreaking in comments (mostly function headers)

  1. … 16 more files in changeset.
whitespace changes: more consistent indentation of comments

  1. … 25 more files in changeset.
fix shadowing of variable names

Update copyright years [skip ci]

  1. … 4 more files in changeset.
make spaces after comma regular

  1. … 8 more files in changeset.
removed null test after dereferences

  1. … 3 more files in changeset.
Change http:// occurrences to https://, if applicable (URLs tested)

  1. … 57 more files in changeset.
* nsf.c, nsfShadow.c (NsfProcStubDeleteProc, Nsf_RenameObjCmd): Provide for coupled renaming of the nsf::proc pairs; and coupled deletion.

  1. … 3 more files in changeset.
improve comments

  1. … 13 more files in changeset.
* nsf.c (ListMethod): Provide a disassemble implementation based on ::tcl::unsupported::disassemble. [::nsf::cmf::info disassemble] is generally available, the info ?object? method variants only in development mode. Implementation covers proc methods and ::nsf::procs. Along the way, prettify some code paths in ListMethod.

  1. … 7 more files in changeset.
More code cleanup

- make nsf compilable with tcl 8.7.2 and TCL_NO_DEPRECATED turned on

- prefer bool over int

- reduce nr of returns before end of function

- line bread overlong function definitions

  1. … 12 more files in changeset.
fix typos, updaty copyright years according to commits

  1. … 13 more files in changeset.
- removed unneeded arguments - mark unused arguments as UNUSED

  1. … 4 more files in changeset.
- cleanup of type conversions

  1. … 6 more files in changeset.
- New macros NSF_nonnull_assert() and nonnull_assert() Background: The unreleased gcc6 with "-pedantic" complaints since recently about asserts, in which nonnull conditions implied by nonnull declarations are explicitly tested, and spits out warnings like ... warning: nonnull argument ... compared to NULL ... The new macros turns off asserts, when gcc6 is used.

  1. … 16 more files in changeset.
Profile trace enhancements: - add optional argument "-builtins" to nsf::__profile_trace to trace a selected list of builtins. Every element of the list passed to "-builtins" might contain a cmd name and optionally a maximum number of arguments to be shown (typically 0 or 1) - generalized NsfReplaceCommand* logic to become more general usable (e.g. for the builtins mechanism of nsf::__profile_trace)

  1. … 6 more files in changeset.
- prefer const over CONST unless Tcl API

  1. … 6 more files in changeset.
- prefer boolean expression in tests over expressions of other types

  1. … 26 more files in changeset.
Done revising license statements in generic/*

  1. … 26 more files in changeset.
- white-space changes

  1. … 15 more files in changeset.
- reduce number of unsued symbols

  1. … 5 more files in changeset.
- reduce variable scopes

  1. … 1 more file in changeset.
- made nsf::is using the "-strict" option when tcl's "string is" is called.

  1. … 2 more files in changeset.
- complete nonnull+assert adding in .c-files other than nsf.c

  1. … 13 more files in changeset.
- update more copyright notices

  1. … 31 more files in changeset.
- further release work

  1. … 35 more files in changeset.
- minor code cleanup

  1. … 1 more file in changeset.