nsfObj.c

Clone Tools
  • last updated 4 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.
Provide an initializer for the new size_t field of Tcl_ObjType (Tcl 9)

  1. … 1 more file 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.
* nsfAccessInt.h (TclIsCommandDeleted), nsf.c, nsfObj.c: More recent Tcl 8.7 (starting Sep 2020) has replaced the macro CMD_IS_DELETED by CMD_DYING.

  1. … 2 more files in changeset.
improve comments and spelling

  1. … 6 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.
make clean compile, when TRACE flags are defined

  1. … 4 more files in changeset.
improve spelling

  1. … 1 more file in changeset.
removed null test after dereferences, avoid potentail null dereferences in error cases

  1. … 3 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.
improve spelling

  1. … 1 more file in changeset.
remove comma before that

  1. … 1 more file in changeset.
coloncmd reform (part 2): generalize code and apply for object specific commands as well

  1. … 3 more files in changeset.
whitespace changes

Align prototypes with function definitons and minor code cleanup

- reduce number of return statements before end of function

- reduce variable scopes

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

  1. … 13 more files in changeset.
nsf.c, nsfInt.h, nsfObj.c: Make epoch counters unsigned ints, so doubling the number of possible epochs.

  1. … 2 more files in changeset.
- Don't assume that CallStackGetTopFrame0() reurns != NULL - reduce variable scopes - reduce number of returns before function end

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

  1. … 4 more files in changeset.
* Updated copyright dates and copyright notices

  1. … 17 more files in changeset.
* Updated copyright dates and copyright notices

  1. … 17 more files in changeset.
nsfObj.c: Fix some typos and align writing style

- white space changes (mostly strip trailing spaces, remove a few tabs)

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

  1. … 6 more files in changeset.
- fix typo

- 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.
MixinregSetFromAny(): Re-arrange control flow as to match other uses in the code base (CID 88777)