diff options
Diffstat (limited to 'generic/tclOO.h')
-rw-r--r-- | generic/tclOO.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/generic/tclOO.h b/generic/tclOO.h index 19d93f9..7cda876 100644 --- a/generic/tclOO.h +++ b/generic/tclOO.h @@ -62,7 +62,12 @@ typedef struct Tcl_ObjectContext_ *Tcl_ObjectContext; typedef int (Tcl_MethodCallProc)(void *clientData, Tcl_Interp *interp, Tcl_ObjectContext objectContext, int objc, Tcl_Obj *const *objv); +#if TCL_MAJOR_VERSION > 8 +typedef int (Tcl_MethodCallProc2)(void *clientData, Tcl_Interp *interp, + Tcl_ObjectContext objectContext, Tcl_Size objc, Tcl_Obj *const *objv); +#else #define Tcl_MethodCallProc2 Tcl_MethodCallProc +#endif typedef void (Tcl_MethodDeleteProc)(void *clientData); typedef int (Tcl_CloneProc)(Tcl_Interp *interp, void *oldClientData, void **newClientData); @@ -93,7 +98,26 @@ typedef struct { * be copied directly. */ } Tcl_MethodType; +#if TCL_MAJOR_VERSION > 8 +typedef struct { + int version; /* Structure version field. Always to be equal + * to TCL_OO_METHOD_VERSION_2 in + * declarations. */ + const char *name; /* Name of this type of method, mostly for + * debugging purposes. */ + Tcl_MethodCallProc2 *callProc; + /* How to invoke this method. */ + Tcl_MethodDeleteProc *deleteProc; + /* How to delete this method's type-specific + * data, or NULL if the type-specific data + * does not need deleting. */ + Tcl_CloneProc *cloneProc; /* How to copy this method's type-specific + * data, or NULL if the type-specific data can + * be copied directly. */ +} Tcl_MethodType2; +#else #define Tcl_MethodType2 Tcl_MethodType +#endif /* * The correct value for the version field of the Tcl_MethodType structure. |