nsf.c

Clone Tools
  • last updated 10 hours ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
- fix compilation when dtrace is activated (missing parthesis, many thanks to Victor Guerra for noticing)

- generic/nsf.c, ObjectDispatch(): Re-arranged the handling of fully-qualified method dispatches with the selectors resolving to existing objects and, in particular, nested (namespace-qualified) objects. Prior to that, dispatches such as "::C ::parent::child" were not covered appropriately: ::parent was reported as valid regObj and so the dispatcher continued to dispatch to the cmd "::parent::child" in the self-context ::parent::child ... with unwanted side-effects (e.g., XOTcl's unknown handling was bypassed). - tests/methods.test: Added basic tests on the (current) handling for such ::* dispatches and a specific test set on the intended XOTcl behaviour.

  1. … 1 more file in changeset.
Merge branch 'master' of ssh://alice.wu-wien.ac.at/usr/local/src/git-repo/nsf

- allow parens in property names (array syntax) - added "/obj/ info name" (as alternative to "namspace tail [self]")

  1. … 3 more files in changeset.
- use newer style of tcl-obj interface instead of sprintf

- implement escaping for comma in value of parameter options: escaping in values can be achived via duplicating the comma. - extend regression test

  1. … 2 more files in changeset.
- explorative implementation of object method dispatches with KEEP_CALLER_SELF and no NSF_PER_OBJECT_DISPATCH - extend regression test

  1. … 2 more files in changeset.
nsf.c: - refactor ObjectCmdMethodDispatch() for clarity - prepare work on object method dispatches with KEEP_CALLER_SELF and no NSF_PER_OBJECT_DISPATCH

  1. … 1 more file in changeset.
- fix off-by-one error

- fix typo

nsf.c: - generalize stack monitor by handling growing and shrinking stacks - refactor into funciton CheckCStack()

  1. … 1 more file in changeset.
- added compile macro NSF_STACKCHECK to provide stack monitoring/debugging (especially useful for multi threaded programs, where stack is more limited)

  1. … 4 more files in changeset.
- protect serial generation for parameters via mutex

  1. … 1 more file in changeset.
- fix compilation when compiled without threads (many thanks for r.zaumseil for noting this).

  1. … 1 more file in changeset.
- pass property name to slot "initialize" method to conform with the interface to "assign", "get" ... (all these receive the property name as well) - allow slot "initialize" method to be protected (handled similarly to "init")

  1. … 3 more files in changeset.
nsf.c: - added object parameter option "slotinitialize" - renamed object parameter option "invokesetter" -> "slotassign" - call slot.assign instead of setter of object - removed restriction on nosetter/invokesetter: nosetter can be used in connection with slotassign - added regression test for slot.initialize

  1. … 4 more files in changeset.
- Fixed a bad interaction between Tcl's apply (pushing lambda frames) and the variable resolvers. The variable resolver was not able to resolve variables, while the command resolver was still working correctly. - Extended regression test

  1. … 2 more files in changeset.
- improve error message to indicate, that nsf refuses to overwrite (redefine) some cmds

  1. … 2 more files in changeset.
- don't allow method to overwrite child object - extended regression test - documented new feature as incompatibility with XOTcl 1

  1. … 4 more files in changeset.
- don't allow object creation to overwrite non-object cmds (e.g. procs)

  1. … 5 more files in changeset.
- use Tcl's EXTERN macro instead of "extern"

  1. … 5 more files in changeset.
- reduce variable scope

- additional object parameter option "invokesetter" managed by nx.tcl This was necessary, since the previously implemented strategy called the setter whenever slot= was provided. This has the problem, that values could be converted twice (once by "configure", once by the setter method", which lead for the converter to a double refcounting on the value.

  1. … 3 more files in changeset.
- Forward setting of object parameters to the slot object, when assign method is user-defined on the slot object - Cleanup and extend regression test

  1. … 3 more files in changeset.
- Cleanup for compilation under MSC (avoid unsupported forward declaration of array) - further documentation of functions, better grouping of functions

- C89/C99 do not allow forward declaration of arrays with "static" storage classifiers (a feature which is a gcc extension only). For MSVC compat, I fixed these occurrences and verified that nsf builds with "gcc -std=c89 -pedantic". - generic/gentclAPI.tcl: Modified the print statements for two array forward declarations (method_definitions, enumeratorConverterEntries)

  1. … 2 more files in changeset.
- changed object->flags from "unsigend short" to "unsigned int" - reintroduced NSF_TCL_DELETE to address bug flagged from memdebug - extended regression test

  1. … 3 more files in changeset.
- fixed NRE memory management (for Tcl 8.6) by refactoring alias handling

  1. … 1 more file in changeset.
- extend regression test for interactions between "keepcallerself" and "perobjectdispatch" - some minor cleanup

  1. … 2 more files in changeset.
- fixed potential crash from method caching, when permissions on cmds are changed and become e.g. unresolvable - removed flag allowmethoddispatch, since behavior can be achived via private flag. - extended regression test

  1. … 9 more files in changeset.