| |
3165 |
3165 |
- nx.tcl: |
| |
3166 |
3166 |
* added protected and public for "require method" |
| |
3167 |
3167 |
The following forms are now valid |
| |
3168 |
3168 |
"... require public method" |
| |
3169 |
3169 |
"... require protected method" |
| |
3170 |
3170 |
"... require method" |
| |
3171 |
3171 |
"... require public class method" |
| |
3172 |
3172 |
"... require protected class method" |
| |
3173 |
3173 |
"... require class method" |
| |
3174 |
3174 |
* extended regression test |
| |
3175 |
3175 |
|
| |
3176 |
3176 |
- library/mongodb: |
| |
3177 |
3177 |
* replaced NsfMongoGetHostPort() with the newly available |
| |
3178 |
3178 |
function mongo_parse_host() |
| |
3179 |
3179 |
* updated error codes according to git head |
| |
3180 |
3180 |
* factored out mapping of error code to string |
| |
3181 |
3181 |
|
| |
3182 |
3182 |
- nsf.c: |
| |
3183 |
3183 |
added cmd __db_compile_epoch for compile-epoch introspection |
| |
3184 |
3184 |
|
| |
3185 |
|
TODO: |
| |
3186 |
|
- zzz why is the method recompiled for /tmp/sp.tcl ? |
| |
3187 |
|
debug output with VAR_RESOLVER_TRACE |
| |
|
3185 |
- Mystery solved, why in the script below the interp>compileEpoch is |
| |
|
3186 |
incremented, when D is redefined, but in other cases not. In the |
| |
|
3187 |
script below the method D.init is compiled by tcl, since it has a |
| |
|
3188 |
trivial body. Therefore, a redefinition of D will remove this |
| |
|
3189 |
compiled body and all its potential usages. Therefore the |
| |
|
3190 |
interp->epoch is incremented. If the body is e.g. "return", the |
| |
|
3191 |
epoch is not incremented (observed with Tcl 8.5.10) |
| |
|
3192 |
|
| |
3188 |
3193 |
================================================= |
| |
3189 |
3194 |
# -*- Tcl -*- |
| |
3190 |
|
package require XOTcl; namespace import ::xotcl::* |
| |
|
3195 |
package require XOTcl; namespace import -force ::xotcl::* |
| |
3191 |
3196 |
package require nx::test; namespace import nx::Test |
| |
3192 |
3197 |
|
| |
3193 |
3198 |
Class C; C c |
| |
3194 |
3199 |
Class D -superclass C |
| |
3195 |
3200 |
D instproc init args {} |
| |
3196 |
3201 |
|
| |
3197 |
3202 |
Test new \ |
| |
3198 |
3203 |
-count 100 \ |
| |
3199 |
|
-pre {Class D; Class E; Class E1; Class X -instmixin {D E E1}} \ |
| |
|
3204 |
-pre { |
| |
|
3205 |
puts stderr ===create-D;Class create D; puts stderr ===D-created; |
| |
|
3206 |
Class E; Class E1; Class X -instmixin {D E E1}} \ |
| |
3200 |
3207 |
-cmd {X info instmixin ::E*} \ |
| |
3201 |
3208 |
-expected {::E ::E1} \ |
| |
3202 |
3209 |
-post {foreach o {D E E1 X} {$o destroy}} |
| |
3203 |
3210 |
|
| |
3204 |
3211 |
Test new \ |
| |
3205 |
3212 |
-count 100 \ |
| |
3206 |
3213 |
-pre {Class D; Class E; Class X -instmixin {D E}} \ |
| |
3207 |
3214 |
-cmd {X info instmixin ::E*} \ |
| |
3208 |
3215 |
-expected {::E} \ |
| |
3209 |
3216 |
-post {foreach o {D E X} {$o destroy}} |
| |
3210 |
3217 |
|
| |
3211 |
3218 |
Test run; exit |
| |
3212 |
3219 |
================================================= |
| |
3213 |
3220 |
|
| |
|
3221 |
- nsf.c: |
| |
|
3222 |
* enabled MEM_COUNT debugging for multi-threaded |
| |
|
3223 |
apps. We collect the MEM_COUNT statistics now |
| |
|
3224 |
per interp. Therefore, we have to pass around |
| |
|
3225 |
"interp" in case where alloc() and free() |
| |
|
3226 |
or refCount functions are used (textually, |
| |
|
3227 |
a big change) |
| |
|
3228 |
* verified, that nsf runs clean in aolserver/naviserver |
| |
|
3229 |
(all INCR_REF_COUNTS all balanced) |
| |
|
3230 |
|
| |
|
3231 |
|
| |
|
3232 |
TODO: |
| |
3214 |
3233 |
- strange refcounting bug in 8.6b2 bug-is-86.tcl |
| |
3215 |
3234 |
where 2 refcounted items are not freed (value:class, |
| |
3216 |
3235 |
issued from nx.tcl around line 120). Compile with DEBUG86B2 |
| |
3217 |
3236 |
for more info |
| |
3218 |
3237 |
================================================= |
| |
3219 |
3238 |
# -*- Tcl -*- |
| |
3220 |
3239 |
package req nx |
| |
3221 |
3240 |
package require nx::test |
| |
3222 |
3241 |
|
| |
3223 |
3242 |
nx::Test case ensemble-next-with-colon-prefix { |
| |
3224 |
3243 |
nx::Object create obj { |
| |
3225 |
3244 |
:public method foo {} { return [:info class] } |
| |
3226 |
3245 |
#:public method bar {} { return [:info] } |
| |
3227 |
3246 |
:method info {} {;} |
| |
3228 |
3247 |
} |
| |
3229 |
3248 |
? {obj foo} {wrong # args: should be ":info"} |
| |
3230 |
3249 |
} |
| |
3231 |
3250 |
================================================= |
| |
3232 |
3251 |
|
| |
3233 |
3252 |
- from parameters.test |