Tcl Source Code

Check-in [81b322475b]
Login

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

Overview
Comment:eliminate compiler warning in previous commit
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 81b322475b97e523ff4fda6dfd6f21bcd18f091d
User & Date: jan.nijtmans 2012-09-17 10:50:06
Context
2012-09-18
20:44
merge release branch check-in: 29624cf67f user: dgp tags: trunk
2012-09-17
12:26
merge trunk check-in: 328958e0e1 user: dgp tags: core-8-6-b3-rc
10:50
eliminate compiler warning in previous commit check-in: 81b322475b user: jan.nijtmans tags: trunk
10:45
eliminate compiler warning in previous commit check-in: 6b15f347eb user: jan.nijtmans tags: core-8-5-branch
2012-09-16
15:51
Nicer style test. check-in: 5a15cd0ee2 user: stwo tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to generic/tclBinary.c.

306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
    if (length < 0) {
	length = 0;
    }
    byteArrayPtr = 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);
}

/*







|







306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
    if (length < 0) {
	length = 0;
    }
    byteArrayPtr = ckalloc(BYTEARRAY_SIZE(length));
    byteArrayPtr->used = length;
    byteArrayPtr->allocated = length;

    if ((bytes != NULL) && (length > 0)) {
	memcpy(byteArrayPtr->bytes, bytes, (size_t) length);
    }
    objPtr->typePtr = &tclByteArrayType;
    SET_BYTEARRAY(objPtr, byteArrayPtr);
}

/*