Description: |
The documentation for Tcl_NewMethod:
Tcl_Method
Tcl_NewMethod(interp, class, nameObj, isPublic,
methodTypePtr, clientData)
...
int isPublic (in) A boolean flag saying whether the
method is to be exported.
seems to be mistaken.
The implementation of Tcl_NewMethod() calls its third argument "flags"
and it pulls from "flags" the particular bit settings PUBLIC_METHOD
and PRIVATE_METHOD for storing in the new Method struct .
The upshot is that passing the values 1 or 2 or 3 which as booleans
are all the same "true" value, actually will result in different
behaviors, some potentially seriously broken.
Either the documented interface or the implementation should be
chosen to survive, with the other adjusted as needed. If the interface
is revised, the bit definitions will need exporting.
|