diff options
| author | dkf <donal.k.fellows@manchester.ac.uk> | 2018-08-05 20:14:04 (GMT) |
|---|---|---|
| committer | dkf <donal.k.fellows@manchester.ac.uk> | 2018-08-05 20:14:04 (GMT) |
| commit | ed3e9c60bac115e7ad38b1169dacc8bf974e99d2 (patch) | |
| tree | 697bc1942f5c809c684cb91657e32a0c224ba30b /generic/tclOO.c | |
| parent | d87884d51b4fcfc7d9a09febe9a351dad983d732 (diff) | |
| download | tcl-ed3e9c60bac115e7ad38b1169dacc8bf974e99d2.zip tcl-ed3e9c60bac115e7ad38b1169dacc8bf974e99d2.tar.gz tcl-ed3e9c60bac115e7ad38b1169dacc8bf974e99d2.tar.bz2 | |
Combine the two bits of scripted code inside TclOO's definition into one.
Diffstat (limited to 'generic/tclOO.c')
| -rw-r--r-- | generic/tclOO.c | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/generic/tclOO.c b/generic/tclOO.c index 630e977..7702b2b 100644 --- a/generic/tclOO.c +++ b/generic/tclOO.c @@ -312,7 +312,7 @@ InitFoundation( ThreadLocalData *tsdPtr = Tcl_GetThreadData(&tsdKey, sizeof(ThreadLocalData)); Foundation *fPtr = ckalloc(sizeof(Foundation)); - Tcl_Obj *namePtr, *argsPtr, *bodyPtr; + Tcl_Obj *namePtr; Tcl_DString buffer; Command *cmdPtr; int i; @@ -392,18 +392,6 @@ InitFoundation( } /* - * Create the default <cloned> method implementation, used when 'oo::copy' - * is called to finish the copying of one object to another. - */ - - TclNewLiteralStringObj(argsPtr, "originObject"); - Tcl_IncrRefCount(argsPtr); - bodyPtr = Tcl_NewStringObj(clonedBody, -1); - TclOONewProcMethod(interp, fPtr->objectCls, 0, fPtr->clonedName, argsPtr, - bodyPtr, NULL); - TclDecrRefCount(argsPtr); - - /* * Finish setting up the class of classes by marking the 'new' method as * private; classes, unlike general objects, must have explicit names. We * also need to create the constructor for classes. |
