Diff
Not logged in

Differences From Artifact [a4dd2e1ebd]:

To Artifact [a9b563ac8a]:


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/*
 * tclResult.c --
 *
 *	This file contains code to manage the interpreter result.
 *
 * Copyright (c) 1997 by Sun Microsystems, Inc.
 *
 * See the file "license.terms" for information on usage and redistribution of
 * this file, and for a DISCLAIMER OF ALL WARRANTIES.
 *
 * RCS: @(#) $Id: tclResult.c,v 1.61.2.1 2010/09/22 01:08:49 kennykb Exp $
 */

#include "tclInt.h"

/*
 * Indices of the standard return options dictionary keys.
 */










|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/*
 * tclResult.c --
 *
 *	This file contains code to manage the interpreter result.
 *
 * Copyright (c) 1997 by Sun Microsystems, Inc.
 *
 * See the file "license.terms" for information on usage and redistribution of
 * this file, and for a DISCLAIMER OF ALL WARRANTIES.
 *
 * RCS: @(#) $Id: tclResult.c,v 1.61.2.2 2010/10/01 13:34:09 kennykb Exp $
 */

#include "tclInt.h"

/*
 * Indices of the standard return options dictionary keys.
 */
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
	if (length > TCL_RESULT_SIZE) {
	    iPtr->result = ckalloc((unsigned) length+1);
	    iPtr->freeProc = TCL_DYNAMIC;
	} else {
	    iPtr->result = iPtr->resultSpace;
	    iPtr->freeProc = 0;
	}
	strcpy(iPtr->result, result);
    } else {
	iPtr->result = (char *) result;
	iPtr->freeProc = freeProc;
    }

    /*
     * If the old result was dynamically-allocated, free it up. Do it here,







|







432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
	if (length > TCL_RESULT_SIZE) {
	    iPtr->result = ckalloc((unsigned) length+1);
	    iPtr->freeProc = TCL_DYNAMIC;
	} else {
	    iPtr->result = iPtr->resultSpace;
	    iPtr->freeProc = 0;
	}
	memcpy(iPtr->result, result, (unsigned) length+1);
    } else {
	iPtr->result = (char *) result;
	iPtr->freeProc = freeProc;
    }

    /*
     * If the old result was dynamically-allocated, free it up. Do it here,