Issue 110: Suggested optimization for string duplication (c_mapping-rtf) Source: (, ) Nature: Enhancement Severity: Summary: Summary: It would be useful if CORBA_string_alloc() took an "optional" second argument which would be the string value to initialize the new string to, since ANSI C does not have strdup(). Resolution: Close with no change Revised Text: Actions taken: September 11, 1996: Received issue December 12, 1996: moved from cxx_revision to c-rev-wg October 5, 2000: closed issue Discussion: same as for Issue 109. End of Annotations:===== From geoff Wed Sep 11 13:36:06 1996 Received: by amethyst.omg.org.omg.org (5.4R2.01/1.34) id AA05510; Wed, 11 Sep 1996 13:36:06 -0400 Date: Wed, 11 Sep 1996 13:36:06 -0400 From: geoff (Geoffrey Speare) Message-Id: <9609111736.AA05510@amethyst.omg.org.omg.org> To: issue-logger@omg.org Subject: C mapping: suggested optimization for string duplication X-Omg-Issue: 110 Date: Mon, 9 Sep 1996 17:21:27 PDT Sender: Bill Janssen From: Bill Janssen To: issues@omg.org Subject: C mapping: suggested optimization for string duplication Cc: orbos@omg.org It would be useful if CORBA_string_alloc() took an `optional' second argument which would be the string value to initialize the new string to, since ANSI C for some wierd reason doesn't include the strdup() function. Optional in the sense that it could be NULL. Bill >From mail Wed Oct 9 14:48 EDT 1996 Sender: Bill Janssen From: Bill Janssen To: c-rev-wg@omg.org Subject: suggested resolution for issue 110 (suggested optimization for string duplication) Date: Wed, 9 Oct 1996 11:44:37 PDT Content-Length: 333 I propose we add a new required function: char * CORBA_string_duplicate (char *string); which, if "string" is non-NIL, allocates strlen("string")+1 bytes, copies "string" into that allocated space, and returns the newly allocated space, or, if "string" is a NIL pointer, returns a NIL pointer without allocating any space. Bill >From mail Wed Oct 9 14:48 EDT 1996 Sender: Bill Janssen From: Bill Janssen To: c-rev-wg@omg.org Subject: suggested resolution for issue 110 (suggested optimization for string duplication) Date: Wed, 9 Oct 1996 11:44:37 PDT Content-Length: 333 I propose we add a new required function: char * CORBA_string_duplicate (char *string); which, if "string" is non-NIL, allocates strlen("string")+1 bytes, copies "string" into that allocated space, and returns the newly allocated space, or, if "string" is a NIL pointer, returns a NIL pointer without allocating any space. Bill >From mail Thu Oct 31 13:17 EST 1996 Date: 31 Oct 96 09:58:59 -0800 From: "KCOLEMAN.US.ORACLE.COM" To: c-rev-wg@omg.org Subject: Comments on current C issues Content-Length: 4445 Issue 110 - string duplication ------------------------------ Rather than a second parameter on CORBA_string_alloc, why not just have a string dup operation? At the risk of drawing fire down on my head, this is what they did to the C++ mapping and I think it is entirely appropriate: CORBA_char* CORBA_string_dup(const CORBA_char*); Date: Mon, 13 Mar 2000 18:11:24 -0500 From: "Barker, Thomas" Subject: Issues to be discused and voted by 3/24/2000(COB) To: "'C-RFT'" Message-id: <99AA2270B1E6D111BCE10000F805F17F043EB1FD@emss35m02.owg.fs.lmco.com> MIME-version: 1.0 X-Mailer: Internet Mail Service (5.5.2650.21) Content-transfer-encoding: 7BIT Content-Type: text/plain; charset=iso-8859-1 X-UIDL: K,Ie9SN0!!?]7!!*@,!! I want to start making some progress on the C RTF (I aplologize for not getting to it earlier, but it been a bad fall and winter). I think that many of the issues can be dealt with quickly so I propose to try to kill about 10 per week for the next couple of months. This batch seemed typical. I just took the first 10 from the list at http://www.omg.org/issues/c_mapping-rtf.html. I'd think the requirement for a vote by 3/24 seems reasonable, but if I discusion between now and 3/17 indicates that any particular issue(s) are not agreeable to everyone I will pull that issue(s) from the list to be voted in this batch. I have gone through the issues, copied the name and summary sentence into this note, then proposed a resolution for each. Tom Issue 110: Suggested optimization for string duplication Summary It would be useful if CORBA_string_alloc() took an "optional" second argument which would be the string value to initialize the new string to, since ANSI C does not have strdup(). Discussion - Same comments as for Issue 109. Suggest we close it with no change.