nsf.c

Clone Tools
  • last updated 21 hours ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
updated copyright notice

improve spelling

  1. … 10 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. … 5 more files in changeset.
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

  1. … 1 more file in changeset.
Provide an initializer for the new size_t field of Tcl_ObjType (Tcl 9)

  1. … 1 more file in changeset.
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

  1. … 1 more file in changeset.
Deactive block for double-checking chached data for Tcl commands

Leave the code for potential future debugging purposes

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

  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.
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. … 3 more files 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.
improve function description

remove realtive costly asserts when not in development mode

  1. … 1 more file in changeset.
* nsf.c (ObjectDispatch): Fix another invalid read of a cached cmd structure (NsfColonCommandContext)

* nsf.c (NsfUnsetTrace, VolatileMethod): Plug a post-mortem memleak related to volatile objects (The Tcl_Obj carrying an auto-qualified object name was not cleaned up properly during interp shutdown because the matching decrement operations used to be disabled during shutdown.)

* nsf.c (ObjectDispatch): Fix invalid read as indicated by valgrind by guarding access to intrep.

fixed false positive from facebook infer 1.1.0

reduced warnings from clang12 static checker (null value passed to non-null arguments, dead assignment, ...)

Merge branch 'master' of ssh://alice.wu-wien.ac.at/usr/local/src/git-repo/nsf

First attempt to fight valgrind warning on cond/unintialized jump

* nsf.c (Nsf_Init): Plumb a small memory leak due to not clearing mp_int data. Make sure _not_ to use mp_clear (TIP 538).

update copyright dates

  1. … 1 more file in changeset.
Do not support predefined parameter options spelled with trailing content

This change makes argument type checking more strict by rejecting

names as synonyms which are longer than the specified values.

Background: Previous versions did not handle cases correctly where an

application type name starts with the same characters as a built-in

type. So it was not possible to define a type "object_id", since a a

spec of the form "x:object_id" was interpreted as "x:object".

* 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.
* nsf.c (ParamOptionParse): Simplify option parsing for substdefault; Tcl_GetInt knows how to handle 0b binary constants, no expr call needed.