nsfStack.c

Clone Tools
  • last updated 6 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.
reduced compiler warnings when compiling against Tcl 8.6* with TIDY settings

  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.
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.
improve spelling: move closer to the linux documentation recommendations

  1. … 19 more files in changeset.
improve spelling

  1. … 6 more files in changeset.
avoid dangerous and potentially recursive macro definition "pure"

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

  1. … 8 more files in changeset.
reduce dead store operations and null after dereference

  1. … 1 more file 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.
* nsf.c (NsfOUplevelMethod, NsfOUpvarMethod, NsfCallstackFindCallingContext): Reform of uplevel and upvar methods, based on the recent feedback by Zoran. First, uplevel and upvar methods, as well as [current callinglevel] now behave consistently (re frame skipping for mixin and filter transparency). If there is no innermost enclosing proc frame, the innermost non-proc (e.g., namespace) frame is selected (rather than a "#0" as default). Second, argument handling for both uplevel (i.e., level sniffing in multi-arg case) and upvar (e.g., made silent TCL_ERROR for invalid argument arities explicit) have been fixed. * Object.man, methods.test: Added documentation for both methods (Object.man) and tests.

  1. … 7 more files in changeset.
break overlong lines

add const declarations, reduce variable scopes, break longish lines

  1. … 2 more files in changeset.
add const and pure declarations

  1. … 2 more files in changeset.
More code cleanup:

- use Boolean type when appropriate

- reduce implicit conversions

  1. … 1 more file in changeset.
align naming of variables in function prototypes and definitions

  1. … 5 more files in changeset.
mark unused arguments as UNUSED

  1. … 1 more file in changeset.
prefer meaningful name in function prototypes align names in .decls file with prototypes in the .c and .h files

  1. … 6 more files in changeset.
Move prototypes to begin of file

Minor cleanup: remove commented code, add missin nonnull-assert, shorten overlong lines

* nsf.c, nsfStack.c: Bump copyright years.

  1. … 1 more file in changeset.
* nsf.c (ObjectCmdMethodDispatch), protected.test: For ensemble (submethod) dispatches, since ever, call protection had not been enforced at all. This commit enables call protection (protected) for ensembles and adds basic tests. * nsfStack.c (GetSelfObj): To allow one to resolve the self reference at arbitrary callstack levels, separate GetSelfObj into GetSelfObj (macro) for the topmost self and GetSelfObj2.

  1. … 2 more files in changeset.
minor cleanup and optimizations

  1. … 1 more file in changeset.
Minor cleanup

  1. … 1 more file in changeset.