Index: ChangeLog-2.0.0-2.1.0.log =================================================================== diff -u -rf934951db464db1a6f39ac98290ecde17a466cd7 -r0de05aaed50fced1cd80a9408560a38fb2454bcf --- ChangeLog-2.0.0-2.1.0.log (.../ChangeLog-2.0.0-2.1.0.log) (revision f934951db464db1a6f39ac98290ecde17a466cd7) +++ ChangeLog-2.0.0-2.1.0.log (.../ChangeLog-2.0.0-2.1.0.log) (revision 0de05aaed50fced1cd80a9408560a38fb2454bcf) @@ -1034,7 +1034,7 @@ 2015-12-25 Gustaf Neumann - * nsf.c, nsfInt.h, nsfProfile.c, configure.ac: Substitue all + * nsf.c, nsfInt.h, nsfProfile.c, configure.ac: Substitute all remaning ObjectName and ClassName for variant with trailing "_", where appropriate; allow nsf::procs with zero arguments or plain arguments (when "-debug" is used); extended regression test; bump Index: ChangeLog-2.0b5-2.0.0.log =================================================================== diff -u -rf934951db464db1a6f39ac98290ecde17a466cd7 -r0de05aaed50fced1cd80a9408560a38fb2454bcf --- ChangeLog-2.0b5-2.0.0.log (.../ChangeLog-2.0b5-2.0.0.log) (revision f934951db464db1a6f39ac98290ecde17a466cd7) +++ ChangeLog-2.0b5-2.0.0.log (.../ChangeLog-2.0b5-2.0.0.log) (revision 0de05aaed50fced1cd80a9408560a38fb2454bcf) @@ -407,7 +407,7 @@ tests - avoid double memcpy() in dispatch recreate by using ObjectDispatch() rather than CallMethod() - - removed memcpy() in call-directy for "create" + - removed memcpy() in call-directly for "create" - some more cleanup 2014-06-14 Gustaf Neumann Index: TODO =================================================================== diff -u -rc4f449cb353be812ba6502ef8e9587e87881f59b -r0de05aaed50fced1cd80a9408560a38fb2454bcf --- TODO (.../TODO) (revision c4f449cb353be812ba6502ef8e9587e87881f59b) +++ TODO (.../TODO) (revision 0de05aaed50fced1cd80a9408560a38fb2454bcf) @@ -5948,7 +5948,7 @@ procedure-like record checking? * dependency inversion: parseargs is provided by nsf, but requires - nx, occassionally. See: + nx, occasionally. See: % package req nsf 2.1.0 Index: generic/nsfDebug.c =================================================================== diff -u -re9dc4cee64cb4efe405481bf600c6f23361a32d4 -r0de05aaed50fced1cd80a9408560a38fb2454bcf --- generic/nsfDebug.c (.../nsfDebug.c) (revision e9dc4cee64cb4efe405481bf600c6f23361a32d4) +++ generic/nsfDebug.c (.../nsfDebug.c) (revision 0de05aaed50fced1cd80a9408560a38fb2454bcf) @@ -3,7 +3,7 @@ * * Debugging facilities for the Next Scripting Framework. * - * Copyright (C) 1999-2016 Gustaf Neumann (a, b) + * Copyright (C) 1999-2017 Gustaf Neumann (a, b) * Copyright (C) 1999-2007 Uwe Zdun (a, b) * Copyright (C) 2016-2017 Stefan Sobernig (b) * Index: generic/nsfError.c =================================================================== diff -u -r5df12821bf0c331be48b7b01b986f9db6dab72c9 -r0de05aaed50fced1cd80a9408560a38fb2454bcf --- generic/nsfError.c (.../nsfError.c) (revision 5df12821bf0c331be48b7b01b986f9db6dab72c9) +++ generic/nsfError.c (.../nsfError.c) (revision 0de05aaed50fced1cd80a9408560a38fb2454bcf) @@ -3,7 +3,7 @@ * * Error reporting functions for the Next Scripting Framework. * - * Copyright (C) 1999-2016 Gustaf Neumann (a, b) + * Copyright (C) 1999-2017 Gustaf Neumann (a, b) * Copyright (C) 1999-2007 Uwe Zdun (a, b) * Copyright (C) 2011-2016 Stefan Sobernig (b) * Index: generic/nsfFunPtrHashTable.c =================================================================== diff -u -r6af35a888e33da976e283271bb68060f34d91a9a -r0de05aaed50fced1cd80a9408560a38fb2454bcf --- generic/nsfFunPtrHashTable.c (.../nsfFunPtrHashTable.c) (revision 6af35a888e33da976e283271bb68060f34d91a9a) +++ generic/nsfFunPtrHashTable.c (.../nsfFunPtrHashTable.c) (revision 0de05aaed50fced1cd80a9408560a38fb2454bcf) @@ -5,7 +5,7 @@ * as hash keys, and a slim wrapper around Tcl's hashtable * API to manage them. * - * Copyright (C) 2016 Gustaf Neumann + * Copyright (C) 2016-2017 Gustaf Neumann * Copyright (C) 2016 Stefan Sobernig * * Vienna University of Economics and Business Index: generic/nsfObj.c =================================================================== diff -u -r1aa07d20cab9258b273f984cd694673dfa6a86b8 -r0de05aaed50fced1cd80a9408560a38fb2454bcf --- generic/nsfObj.c (.../nsfObj.c) (revision 1aa07d20cab9258b273f984cd694673dfa6a86b8) +++ generic/nsfObj.c (.../nsfObj.c) (revision 0de05aaed50fced1cd80a9408560a38fb2454bcf) @@ -3,7 +3,7 @@ * * Tcl_Obj types provided by the Next Scripting Framework. * - * Copyright (C) 1999-2016 Gustaf Neumann + * Copyright (C) 1999-2017 Gustaf Neumann * Copyright (C) 2016 Stefan Sobernig * * Vienna University of Economics and Business @@ -76,14 +76,14 @@ static void MethodFreeInternalRep( register Tcl_Obj *objPtr) /* Tcl_Obj structure object with internal - * representation to free. */ + * representation to free. */ { NsfMethodContext *mcPtr = (NsfMethodContext *)objPtr->internalRep.twoPtrValue.ptr1; if (mcPtr != NULL) { #if defined(METHOD_OBJECT_TRACE) fprintf(stderr, "MethodFreeInternalRep %p methodContext %p methodEpoch %d type <%s>\n", - objPtr, mcPtr, mcPtr->methodEpoch, (objPtr->typePtr != NULL) ? objPtr->typePtr->name : "none"); + objPtr, mcPtr, mcPtr->methodEpoch, (objPtr->typePtr != NULL) ? objPtr->typePtr->name : "none"); #endif /* * ... and free structure @@ -128,21 +128,21 @@ int NsfMethodObjSet( Tcl_Interp *UNUSED(interp), /* Used for error reporting if not NULL. */ - register Tcl_Obj *objPtr, /* The object to convert. */ + register Tcl_Obj *objPtr, /* The object to convert. */ Tcl_ObjType *objectType, void *context, /* context (to avoid over-eager sharing) */ unsigned int methodEpoch, /* methodEpoch */ - Tcl_Command cmd, /* the tclCommand behind the method */ - NsfClass *cl, /* the object/class where the method was defined */ + Tcl_Command cmd, /* the Tcl command behind the method */ + NsfClass *cl, /* the object/class where the method was defined */ unsigned int flags /* flags */ - ) + ) { NsfMethodContext *mcPtr; #if defined(METHOD_OBJECT_TRACE) fprintf(stderr, "... NsfMethodObjSet %p %s context %p methodEpoch %d " - "cmd %p cl %p %s old obj type <%s> flags %.6x\n", - objPtr, ObjStr(objPtr), context, methodEpoch, cmd, cl, + "cmd %p cl %p %s old obj type <%s> flags %.6x\n", + objPtr, ObjStr(objPtr), context, methodEpoch, cmd, cl, (cl != NULL) ? ClassName(cl) : "obj", (objPtr->typePtr != NULL) ? objPtr->typePtr->name : "none", flags); #endif @@ -162,13 +162,13 @@ objPtr->typePtr = objectType; #if defined(METHOD_OBJECT_TRACE) fprintf(stderr, "alloc %p methodContext %p methodEpoch %d type <%s> %s refCount %d\n", - objPtr, mcPtr, methodEpoch, objectType->name, ObjStr(objPtr), objPtr->refCount); + objPtr, mcPtr, methodEpoch, objectType->name, ObjStr(objPtr), objPtr->refCount); #endif } else { mcPtr = (NsfMethodContext *)objPtr->internalRep.twoPtrValue.ptr1; #if defined(METHOD_OBJECT_TRACE) fprintf(stderr, "... NsfMethodObjSet %p reuses internal rep, serial (%d/%d) refCount %d\n", - objPtr, mcPtr->methodEpoch, methodEpoch, objPtr->refCount); + objPtr, mcPtr->methodEpoch, methodEpoch, objPtr->refCount); #endif } @@ -214,7 +214,7 @@ static void FlagFreeInternalRep( Tcl_Obj *objPtr) /* Tcl_Obj structure object with internal - * representation to free. */ + * representation to free. */ { register NsfFlag *flagPtr = (NsfFlag *)objPtr->internalRep.twoPtrValue.ptr1; @@ -272,13 +272,13 @@ int NsfFlagObjSet( Tcl_Interp *UNUSED(interp), /* Used for error reporting if not NULL. */ - register Tcl_Obj *objPtr, /* The object to convert. */ + register Tcl_Obj *objPtr, /* The object to convert. */ Nsf_Param const *baseParamPtr, /* the full parameter block */ int serial, /* interface serial */ - Nsf_Param const *paramPtr, /* a single parameter */ - Tcl_Obj *payload, /* payload */ - unsigned int flags /* detail infos */ - ) + Nsf_Param const *paramPtr, /* a single parameter */ + Tcl_Obj *payload, /* payload */ + unsigned int flags /* detail infos */ + ) { NsfFlag *flagPtr; @@ -357,7 +357,7 @@ static void MixinregFreeInternalRep( register Tcl_Obj *objPtr) /* Mixinreg structure object with internal - * representation to free. */ + * representation to free. */ { Mixinreg *mixinRegPtr = (Mixinreg *)objPtr->internalRep.twoPtrValue.ptr1; @@ -394,7 +394,7 @@ #if defined(METHOD_OBJECT_TRACE) fprintf(stderr, "MixinregDupInternalRep src %p dst %p\n", - srcObjPtr, dstObjPtr); + srcObjPtr, dstObjPtr); #endif dstPtr = NEW(Mixinreg); memcpy(dstPtr, srcPtr, sizeof(Mixinreg)); @@ -421,78 +421,80 @@ Tcl_Interp *interp, /* Used for error reporting if not NULL. */ Tcl_Obj *objPtr) /* The object to convert. */ { - NsfClass *mixin = NULL; - Tcl_Obj *guardObj = NULL, *nameObj = NULL; - Mixinreg *mixinRegPtr; - int oc, result; Tcl_Obj **ov; + NsfClass *mixin = NULL; + int oc, result; + Tcl_Obj **ov; result = Tcl_ListObjGetElements(interp, objPtr, &oc, &ov); - if (unlikely(result != TCL_OK)) { - /* invalid Tcl list */ - return result; - } + if (likely(result == TCL_OK)) { + Tcl_Obj *guardObj, *nameObj; - if (oc == 1) { - nameObj = ov[0]; + /* + * objPtr holds a valid Tcl list + */ + if (oc == 1) { + nameObj = ov[0]; + guardObj = NULL; - /*} else if (oc == 2) { + } else if (oc == 3 && !strcmp(ObjStr(ov[1]), NsfGlobalStrings[NSF_GUARD_OPTION])) { nameObj = ov[0]; - guardObj = ov[1];*/ + guardObj = ov[2]; - } else if (oc == 3 && !strcmp(ObjStr(ov[1]), NsfGlobalStrings[NSF_GUARD_OPTION])) { - nameObj = ov[0]; - guardObj = ov[2]; + } else { + nameObj = objPtr; + guardObj = NULL; + } - } else { - nameObj = objPtr; - } + /* + * Syntax was ok. Try to lookup mixin classes: + */ + if (NsfGetClassFromObj(interp, nameObj, &mixin, 1) != TCL_OK) { + result = NsfObjErrType(interp, "mixin", nameObj, "a class as mixin", NULL); + } else { + Mixinreg *mixinRegPtr; - /* - * Syntax was ok. Try to lookup mixin classes: - */ - if (NsfGetClassFromObj(interp, nameObj, &mixin, 1) != TCL_OK) { - return NsfObjErrType(interp, "mixin", nameObj, "a class as mixin", NULL); - } + assert(mixin != NULL); - /* - * Conversion was ok. - * Allocate structure ... - */ - mixinRegPtr = NEW(Mixinreg); - mixinRegPtr->mixin = mixin; - mixinRegPtr->guardObj = guardObj; + /* + * Conversion was ok. + * Allocate structure ... + */ + mixinRegPtr = NEW(Mixinreg); + mixinRegPtr->mixin = mixin; + mixinRegPtr->guardObj = guardObj; - /* - * ... and increment refCounts - */ - NsfObjectRefCountIncr((&mixin->object)); - if (guardObj != NULL) {INCR_REF_COUNT2("mixinRegPtr->guardObj", guardObj);} + /* + * ... and increment refCounts + */ + NsfObjectRefCountIncr((&mixin->object)); + if (guardObj != NULL) {INCR_REF_COUNT2("mixinRegPtr->guardObj", guardObj);} - /* - * Build list of Tcl_Objs per mixin class for invalidation. - */ - { NsfClassOpt *clOpt = NsfRequireClassOpt(mixin); - if (clOpt->mixinRegObjs == NULL) { - clOpt->mixinRegObjs = Tcl_NewListObj(1, &objPtr); - INCR_REF_COUNT2("mixinRegObjs", clOpt->mixinRegObjs); - } else { - Tcl_ListObjAppendElement(interp, clOpt->mixinRegObjs, objPtr); - } - } + /* + * Build list of Tcl_Objs per mixin class for invalidation. + */ + { NsfClassOpt *clOpt = NsfRequireClassOpt(mixin); + if (clOpt->mixinRegObjs == NULL) { + clOpt->mixinRegObjs = Tcl_NewListObj(1, &objPtr); + INCR_REF_COUNT2("mixinRegObjs", clOpt->mixinRegObjs); + } else { + Tcl_ListObjAppendElement(interp, clOpt->mixinRegObjs, objPtr); + } + } - /*fprintf(stderr, "MixinregSetFromAny alloc mixinReg %p class %p guard %p object->refCount %d\n", - mixinRegPtr, mixinRegPtr->mixin, mixinRegPtr->guardObj, ((&mixin->object)->refCount));*/ + /*fprintf(stderr, "MixinregSetFromAny alloc mixinReg %p class %p guard %p object->refCount %d\n", + mixinRegPtr, mixinRegPtr->mixin, mixinRegPtr->guardObj, ((&mixin->object)->refCount));*/ - /* - * Free the old internal representation and store own structure as internal - * representation. - */ - TclFreeIntRep(objPtr); - objPtr->internalRep.twoPtrValue.ptr1 = (void *)mixinRegPtr; - objPtr->internalRep.twoPtrValue.ptr2 = NULL; - objPtr->typePtr = &NsfMixinregObjType; - - return TCL_OK; + /* + * Free the old internal representation and store own structure as internal + * representation. + */ + TclFreeIntRep(objPtr); + objPtr->internalRep.twoPtrValue.ptr1 = (void *)mixinRegPtr; + objPtr->internalRep.twoPtrValue.ptr2 = NULL; + objPtr->typePtr = &NsfMixinregObjType; + } + } + return result; } /* @@ -536,9 +538,9 @@ obj, obj->refCount);*/ if (MixinregSetFromAny(interp, obj) == TCL_OK) { - mixinRegPtr = obj->internalRep.twoPtrValue.ptr1; + mixinRegPtr = obj->internalRep.twoPtrValue.ptr1; } else { - return TCL_ERROR; + return TCL_ERROR; } } @@ -626,7 +628,7 @@ static void FilterregFreeInternalRep( register Tcl_Obj *objPtr) /* Filterreg structure object with internal - * representation to free. */ + * representation to free. */ { Filterreg *filterregPtr = (Filterreg *)objPtr->internalRep.twoPtrValue.ptr1; @@ -777,7 +779,7 @@ } else { result = TCL_ERROR; } - + return result; } /* Index: generic/nsfPointer.c =================================================================== diff -u -rc4f449cb353be812ba6502ef8e9587e87881f59b -r0de05aaed50fced1cd80a9408560a38fb2454bcf --- generic/nsfPointer.c (.../nsfPointer.c) (revision c4f449cb353be812ba6502ef8e9587e87881f59b) +++ generic/nsfPointer.c (.../nsfPointer.c) (revision 0de05aaed50fced1cd80a9408560a38fb2454bcf) @@ -4,7 +4,7 @@ * Provide API for accessing mallocated data via Tcl. * This is used e.g. via the MongoDB interface. * - * Copyright (C) 2011-2014 Gustaf Neumann + * Copyright (C) 2011-2017 Gustaf Neumann * * Vienna University of Economics and Business * Institute of Information Systems and New Media Index: generic/nsfProfile.c =================================================================== diff -u -r5df12821bf0c331be48b7b01b986f9db6dab72c9 -r0de05aaed50fced1cd80a9408560a38fb2454bcf --- generic/nsfProfile.c (.../nsfProfile.c) (revision 5df12821bf0c331be48b7b01b986f9db6dab72c9) +++ generic/nsfProfile.c (.../nsfProfile.c) (revision 0de05aaed50fced1cd80a9408560a38fb2454bcf) @@ -4,7 +4,7 @@ * Provides profiling on Next Scripting Framework internals. * For turning on profiling, NSF_PROFILE must be configured. * - * Copyright (C) 2010-2016 Gustaf Neumann + * Copyright (C) 2010-2017 Gustaf Neumann * * Vienna University of Economics and Business * Institute of Information Systems and New Media Index: generic/nsfShadow.c =================================================================== diff -u -rb089be700bb58579a48e77619512a47eb3c5562d -r0de05aaed50fced1cd80a9408560a38fb2454bcf --- generic/nsfShadow.c (.../nsfShadow.c) (revision b089be700bb58579a48e77619512a47eb3c5562d) +++ generic/nsfShadow.c (.../nsfShadow.c) (revision 0de05aaed50fced1cd80a9408560a38fb2454bcf) @@ -4,7 +4,7 @@ * API support for shadowing (overloading) and accessing C-implemented * Tcl obj-commands. * - * Copyright (C) 1999-2014 Gustaf Neumann + * Copyright (C) 1999-2017 Gustaf Neumann * * Vienna University of Economics and Business * Institute of Information Systems and New Media Index: generic/nsfStubLib.c =================================================================== diff -u -r878a74b68b15d4ee5c33d345e670f50ce7473ebc -r0de05aaed50fced1cd80a9408560a38fb2454bcf --- generic/nsfStubLib.c (.../nsfStubLib.c) (revision 878a74b68b15d4ee5c33d345e670f50ce7473ebc) +++ generic/nsfStubLib.c (.../nsfStubLib.c) (revision 0de05aaed50fced1cd80a9408560a38fb2454bcf) @@ -5,7 +5,7 @@ * Scripting Framework. * * Copyright (C) 1998 Paul Duffin - * Copyright (C) 2001-2014 Gustaf Neumann (a) + * Copyright (C) 2001-2017 Gustaf Neumann (a) * Copyright (C) 2001-2007 Uwe Zdun (a) * * (a) Vienna University of Economics and Business Index: generic/nsfUtil.c =================================================================== diff -u -rc9f1c850b7c64129d5b8dbe17758965a804711c2 -r0de05aaed50fced1cd80a9408560a38fb2454bcf --- generic/nsfUtil.c (.../nsfUtil.c) (revision c9f1c850b7c64129d5b8dbe17758965a804711c2) +++ generic/nsfUtil.c (.../nsfUtil.c) (revision 0de05aaed50fced1cd80a9408560a38fb2454bcf) @@ -3,7 +3,7 @@ * * Utility functions of the Next Scripting Framework. * - * Copyright (C) 2001-2016 Gustaf Neumann + * Copyright (C) 2001-2017 Gustaf Neumann * Copyright (C) 2001-2007 Uwe Zdun * * Vienna University of Economics and Business Index: library/xotcl/doc/Announce-1.5.6 =================================================================== diff -u -re8715774bf274fbeadabf08a5a0777a968f71148 -r0de05aaed50fced1cd80a9408560a38fb2454bcf --- library/xotcl/doc/Announce-1.5.6 (.../Announce-1.5.6) (revision e8715774bf274fbeadabf08a5a0777a968f71148) +++ library/xotcl/doc/Announce-1.5.6 (.../Announce-1.5.6) (revision 0de05aaed50fced1cd80a9408560a38fb2454bcf) @@ -26,7 +26,7 @@ contained references to deleted XOTcl objects. The problem was introduced by the VarReform changes between 1.5.3 and 1.5.4 by a bad side effect of a Tcl_Obj based command - to look up Tcl command structurs. The problem did not + to look up Tcl command structures. The problem did not exist for xotcl compiled against Tcl 8.5 and is as well fixed on the Tcl side in CVS (might become available, when one more Tcl 8.4 release is eventually released) Index: library/xotcl/doc/Announce-1.6.1 =================================================================== diff -u -re8715774bf274fbeadabf08a5a0777a968f71148 -r0de05aaed50fced1cd80a9408560a38fb2454bcf --- library/xotcl/doc/Announce-1.6.1 (.../Announce-1.6.1) (revision e8715774bf274fbeadabf08a5a0777a968f71148) +++ library/xotcl/doc/Announce-1.6.1 (.../Announce-1.6.1) (revision 0de05aaed50fced1cd80a9408560a38fb2454bcf) @@ -21,7 +21,7 @@ * Extended and generalized "info" method * Generalized serializing package: when deserializing code, now - consistenly no constructors are called. In previous versions, + consistently no constructors are called. In previous versions, constuctors were called on slots; due to the point above, this is not needed; background: the previous solution had problems in aolserver ns_eval, when a slot-constructor called db-functions,