nsfObj.c

Clone Tools
  • last updated 7 hours ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
- New macros NSF_nonnull_assert() and nonnull_assert() Background: The unreleased gcc6 with "-pedantic" complaints since recently about asserts, in which nonnull conditions implied by nonnull declarations are explicitly tested, and spits out warnings like ... warning: nonnull argument ... compared to NULL ... The new macros turns off asserts, when gcc6 is used.

  1. … 16 more files in changeset.
MixinregSetFromAny(): Re-arrange control flow as to match other uses in the code base (CID 88777)

MixinregSetFromAny(): Fix crash through explicit null dereferencing when an invalid list string-rep is provided as mixinreg (CID 88777); added tests

  1. … 1 more file in changeset.
- move assignments after assertions

  1. … 2 more files in changeset.
- prefer const over CONST unless Tcl API

  1. … 6 more files in changeset.
- prefer boolean expression in tests over expressions of other types

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

  1. … 3 more files in changeset.
- keep an internal list of Tcl_Objs of type mixinrefs for classes used as mixins. This list is used for avoiding stale entries in cases the mixin class is destroyed.

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

  1. … 1 more file in changeset.
Done revising license statements in generic/*

  1. … 26 more files in changeset.
- fix a heisenbug probably showing sometimes up due to more aggressive Tcl_Obj sharing in newer versions of tcl 8.6

  1. … 2 more files in changeset.
- white-space changes

  1. … 15 more files in changeset.
- fix final refcounting bug: it was possible that classes contained in Tcl_Objs of type mixinreg were not freed, although their reference-counter became 0; now all test cases free all tcl_objs and referenced data structures allocated from nsf

  1. … 3 more files in changeset.
nsf.c: - make types for bit operations unsigned (mostly flags)

  1. … 7 more files in changeset.
nsf.c - force again literal "-guard" in a "mixinreg" type to avoid potential confusions - Base nsfRelationSet for mixins on cmds rather than TclObjs to avoid confusions and duplication of guard detection logic - Add interp to NsfMixinregGet() and NsfFilterregGet() to be able to return error messages - return more error message from mixinreg converter - provide at least minimal support for "funny class names" (i.e. containing spaces) - FinalObjectDeletion: don't enforce namespace = 1 for cases with wierd namespace deletion order - extended regression test

  1. … 5 more files in changeset.
nsfObj.c: - allow to omit "-guard" within arguments to flag definition of a filter/mixin guard - extended regression test

  1. … 2 more files in changeset.
- complete nonnull+assert adding in .c-files other than nsf.c

  1. … 13 more files in changeset.
- update more copyright notices

  1. … 31 more files in changeset.
- strip trailing spaces

  1. … 4 more files in changeset.
nsf.c: - fix a bug in SlotContainerCmdResolver() when NSF_MEM_COUNT is activated - fix a small memory leak for PER_OBJECT_PARAMETER_CACHING - all cases detectable with --enable-memcount=yes are fixed

  1. … 2 more files in changeset.
- further release work

  1. … 35 more files in changeset.
Object-method Reform: - changed interface to object specific commands by requiring an ensemble named "object". The rational behind is essentially to use always the same info command to retrieve object specific methods, no matter whether these are defined on a plain object or an a class object (does not break the "contract" what e.g. "info method" returns).

Now we define methods via:

/cls/ method foo {args} {...body...}

/cls/ object method foo {args} {...body...}

/obj/ object method foo {args} {...body...}

Similarly, aliases, forwards and mixins are defined, e.g.

/cls/ mixin add ...

/cls/ object mixin add ...

/obj/ object mixin add ...

/obj/ require object method ...

The same change propagated as well to the "info" method.

Now we have:

/cls/ info methods ...

/cls/ info object methods ...

/obj/ info object methods ...

Similar, the object parametererization uses

/cls/ create obj -object-mixin M

/cls/ create obj -object-filter f

/metacls/ create cls -mixin M1 -object-mixin M2

/metacls/ create cls -filter f1 -object-filter f2

- as a consequence,

a) "/cls/ class method ...",

"/cls/ class alias ...",

"/cls/ class forward ...",

"/cls/ class filter ...",

"/cls/ class mixin ...",

"/cls/ class info ..."

"/obj/ class method require method ..."

"/obj/ class method require public method ..."

"/obj/ class method require protected method ..."

"/obj/ class method require private method ..."

were dropped

b) "/obj/ method ....",

"/obj/ alias ....",

"/obj/ forward ...."

"/obj/ filter ...."

"/obj/ mixin ...."

"/obj/ info method*"

"/cls/ create obj -mixin M"

"/cls/ create obj -filter f"

"/obj/ method require method ..."

"/obj/ method require public method ..."

"/obj/ method require protected method ..."

"/obj/ method require private method ..."

were dropped

- added package nx::class to allow optionally the "class" notation

"/cls/ class method ..." (and friends, see (a)), and

"/cls/ class info ...

- added package nx::plain-object-method to allow optionally plain method

b) "/obj/ method ...." (and friends, see (b))

- add support to slots to use ensemble methods as setters

  1. … 43 more files in changeset.
- reduce variable scopes

  1. … 4 more files in changeset.
- updated 34 copyright notices

  1. … 33 more files in changeset.
- improve branch prediction

  1. … 5 more files in changeset.
- add print statements for debugging wierd missing free operations for internal reps of tcl objs

- update copyright notices with MIT licens from OSI (http://www.opensource.org/licenses/MIT)

  1. … 26 more files in changeset.
- cleanup "//" in sources

  1. … 4 more files in changeset.
nsf.c: - don't convert obj types tclCmdName and parsedVarNameType to instanceMethodObjType

  1. … 2 more files in changeset.
- cleanup on nsfObj.c

  1. … 2 more files in changeset.