Fix a few bugs in the tcl module related to clientdata propagation.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6357 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
0df018da0d
commit
143bfb2a62
16 changed files with 257 additions and 63 deletions
|
|
@ -63,6 +63,7 @@ typedef struct swig_class {
|
|||
swig_method *methods;
|
||||
swig_attribute *attributes;
|
||||
struct swig_class **bases;
|
||||
char **base_names;
|
||||
} swig_class;
|
||||
|
||||
typedef struct swig_instance {
|
||||
|
|
@ -525,6 +526,11 @@ SWIG_Tcl_MethodCommand(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_
|
|||
bi = cls_stack_bi[cls_stack_top];
|
||||
cls = cls_stack[cls_stack_top];
|
||||
if (bi != -1) {
|
||||
if (!cls->bases[bi] && cls->base_names[bi]) {
|
||||
/* lookup and cache the base class */
|
||||
swig_type_info *info = SWIG_TypeQuery(cls->base_names[bi]);
|
||||
if (info) cls->bases[bi] = (swig_class *) info->clientdata;
|
||||
}
|
||||
cls = cls->bases[bi];
|
||||
if (cls) {
|
||||
cls_stack_bi[cls_stack_top]++;
|
||||
|
|
|
|||
|
|
@ -670,6 +670,9 @@ SWIGEXPORT(int) SWIG_init(Tcl_Interp *interp) {
|
|||
for (i = 0; swig_types_initial[i]; i++) {
|
||||
swig_types[i] = SWIG_TypeRegister(swig_types_initial[i]);
|
||||
}
|
||||
for (i = 0; swig_types_initial[i]; i++) {
|
||||
SWIG_PropagateClientData(swig_types[i]);
|
||||
}
|
||||
_init = 1;
|
||||
}
|
||||
for (i = 0; swig_commands[i].name; i++) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue