Clone
 

gustaf neumann <neumann@wu-wien.ac.at> in nsf

improved spelling

fixed misleading name of variable

Fixed handling of invalid parameter specs

This bug was occuring e.g. with an invalid parameter spec as in

:property {fiscalyear:integer, required}

where an additional space was introduced. The bug was reported by

Maksym Zinchenko on the xotcl mailing list (many thanks for that!)

and lead to an attempt of adding an empty parameter option.

Now, an error is generated in this case.

improved comment

improved spelling

    • -1
    • +1
    /library/xotcl/library/comm/Access.xotcl
Bug fix: potential crash and swallowed error

The change fixes 2 bugs:

- When a non-existing method was called in a situation where

* a filter with guards is registered, and

* all guards are failing, and

* the method to be called after the filter does not exist

nsf was crashing

- There was no code to produce the proper error message in such situations

improved spelling

    • -1
    • +1
    /library/xotcl/library/lib/xodoc.xotcl
  1. … 4 more files in changeset.
fix typo

whitespace changes

    • -72
    • +71
    /library/xotcl/tests/testo.xotcl
Provide Tcl9 compatibility after TIP #673

TIP #673 removed "trace variable", which was deprecated since the

release of Tcl 8.4. However, since Tcl does not warn about

deprecations, so it was not detected until TIP #673 removed the

command for Tcl9.

nsf:parseargs: honor "required" settings

The previous version was accepting e.g.

nsf::parseargs -asdict {

{-state:wordchar,required}

{-revision_id:integer,required}

{-return_url:localurl "."}

} {}

i.e. passing empty argument list where the first two arguments are required.

Now, the error is flagged properly

provide clean compilation for current Tcl9

maintenance: reflect type change of Tcl TIP 666 (use Tcl_Size for object count in TIP 627)

::mongo::oid::gettimestamp: new API call to obtain creation timestamp from OID

whitespace cleanup

Provided a Tcl_DupInternalRepProc() function for Tcl_ObjType "nsfParam"

Recent versions of Tcl9 call Tcl_DupInternalRepProc() for Tcl_ObjType

"nsfParam", which was a placeholder function before, leading to a

Tcl_Abort(). The provided implementation provides now a basic logic

for "duplicating" internal representations of parameter lists based on

refcounts (somewhat similar to ProcBodyDup), but it has to be tested

further, with a proper test case.

The call of the Tcl_DupInternalRepProc function happens so far during

the startup of NaviServer compiled with Tcl9. It might be necessary to

overthink the competing logics of the "canDelete" member and the

reference count. For now, the intention is to get the NaviServer +

Tcl9 regression test stop from aborting.

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

cleanup after TIP 660

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.

Added missing dependency for forcing recompilation

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

change encoding to UTF-8 to improve robustness in various Tcl9 variants (e.g. tip-657)

    • -1
    • +1
    /library/xotcl/library/lib/Script.xotcl
nx-zip.tcl: Added optional parameter channel to returnZipFile to ease usage in the background

Many thanks to Antonio Pisano for the suggestion!

improve spelling

    • -2
    • +2
    /library/xotcl/library/lib/trace.xotcl
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.

improve spelling

improved documentation

    • -7
    • +17
    /doc/next-tutorial/next-tutorial.txt
improve spelling