Tcl Source Code

View Ticket
Login
Ticket UUID: 3598502
Title: Tcl_ListObj docs - shared objects
Type: Bug Created on: 2012-12-26 06:26:59
Submitter: apnadkarni Assigned to: jan.nijtmans
Subsystem: 14. List Object Severity:
Priority: 5 Medium Last modified: 2014-02-21 19:06:18
Status: Open Closed by:
Resolution: None Closed on:
Version: current: 8.6.0
Description:
Two minor suggestions for the manpage for Tcl_NewListObj

The docs should mention that the listPtr passed to functions like Tcl_ListObjReplace must not be shared.

Secondly, since 8.5.0 (at least) it is legal to do a Tcl_NewListObj(10, NULL) to create a new list obj that is an empty list but has preallocated space. For some applications building large lists, this is very useful but is "undocumented" functionality. It would be nice if this were documented and codified as officially supported (as in the call being legal even if the preallocation is not guaranteed)