Tcl Source Code

Check-in [ef79a774d6]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Nicer style test.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | core-8-5-branch
Files: files | file ages | folders
SHA1: ef79a774d696a3e3d0e62c1bc44904ad7a717015
User & Date: stwo 2012-09-16 15:56:02
Context
2012-09-17
10:45
eliminate compiler warning in previous commit check-in: 6b15f347eb user: jan.nijtmans tags: core-8-5-branch
2012-09-16
15:56
Nicer style test. check-in: ef79a774d6 user: stwo tags: core-8-5-branch
2012-09-11
14:02
3564735 Protect against mem corruption when var resolvers misbehave. check-in: 8ffef269a0 user: dgp tags: core-8-5-branch
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to generic/tclBinary.c.

275
276
277
278
279
280
281
282

283
284
285
286
287
288
289
290
291
292

    if (length < 0) {
	length = 0;
    }
    byteArrayPtr = (ByteArray *) ckalloc(BYTEARRAY_SIZE(length));
    byteArrayPtr->used = length;
    byteArrayPtr->allocated = length;
    if (length && bytes) {

	memcpy(byteArrayPtr->bytes, bytes, (size_t) length);
    }

    objPtr->typePtr = &tclByteArrayType;
    SET_BYTEARRAY(objPtr, byteArrayPtr);
}

/*
 *----------------------------------------------------------------------
 *







|
>


<







275
276
277
278
279
280
281
282
283
284
285

286
287
288
289
290
291
292

    if (length < 0) {
	length = 0;
    }
    byteArrayPtr = (ByteArray *) ckalloc(BYTEARRAY_SIZE(length));
    byteArrayPtr->used = length;
    byteArrayPtr->allocated = length;

    if ((length != NULL) && (bytes > 0)) {
	memcpy(byteArrayPtr->bytes, bytes, (size_t) length);
    }

    objPtr->typePtr = &tclByteArrayType;
    SET_BYTEARRAY(objPtr, byteArrayPtr);
}

/*
 *----------------------------------------------------------------------
 *