View Issue Details

IDProjectCategoryView StatusLast Update
00002271003.1(2008)/Issue 7System Interfacespublic2013-04-16 13:06
Reportereblake Assigned Toajosey  
PrioritynormalSeverityEditorialTypeError
Status ClosedResolutionAccepted As Marked 
NameEric Blake
OrganizationRed Hat
User Referenceebb.newlocale
Sectionnewlocale
Page Number1364
Line Number44724
Interp Status---
Final Accepted Text0000227:0000410
Summary0000227: newlocale wording ambiguity
DescriptionAs written, the behavior of newlocale on an existing base locale_t object is ambiguous on the intended precedence between conjunctions. Adding a strategic comma will make it clear that the intended meaning is (a) or (b and c). That is, an application should not call freelocale(base) if newlocale(m,l,base) succeeded, because either the implementation modified base in-place (a), or the implementation freed the old base (b) as part of allocating a new locale object (c). Adding text to the application usage can't hurt, either.
Desired ActionChange line 44723:

It is unspecified whether the locale object pointed to by base shall be modified or freed and a new locale object created.

to:

It is unspecified whether the locale object pointed to by base shall be modified, or freed and a new locale object created.

Change line 44793:

Handles for locale objects created by the newlocale( ) function should be released by a corresponding call to freelocale( ).

to:

Handles for locale objects created by the newlocale( ) function should be released by either a corresponding call to freelocale( ), or as a base locale to another newlocale( ) call.

Tagstc1-2008

Activities

geoffclare

2010-04-15 14:31

manager   bugnote:0000408

The proposed wording in the second change implies that newlocale()
releases the locale object passed to it as a base locale. I would
suggest instead:

    Handles for locale objects returned by the newlocale() function
    should either be released by a corresponding call to freelocale(),
    or be used as a base locale to another newlocale() call.

msbrown

2010-04-15 15:29

manager   bugnote:0000410

New suggested change, incorporating Geoff's remarks:

Change line 44723:

It is unspecified whether the locale object pointed to by base shall be modified or freed and a new locale object created.

to:

It is unspecified whether the locale object pointed to by base shall be modified, or freed and a new locale object created.

Change line 44793:

Handles for locale objects created by the newlocale( ) function should be released by a corresponding call to freelocale( ).

to:

Handles for locale objects returned by the newlocale() function should either be released by a corresponding call to freelocale(), or be used as a base locale to another newlocale() call.

Issue History

Date Modified Username Field Change
2010-03-25 17:53 eblake New Issue
2010-03-25 17:53 eblake Status New => Under Review
2010-03-25 17:53 eblake Assigned To => ajosey
2010-03-25 17:53 eblake Name => Eric Blake
2010-03-25 17:53 eblake Organization => Red Hat
2010-03-25 17:53 eblake User Reference => ebb.newlocale
2010-03-25 17:53 eblake Section => newlocale
2010-03-25 17:53 eblake Page Number => 1364
2010-03-25 17:53 eblake Line Number => 44724
2010-04-15 14:31 geoffclare Note Added: 0000408
2010-04-15 15:29 msbrown Note Added: 0000410
2010-04-15 15:31 msbrown Interp Status => ---
2010-04-15 15:31 msbrown Final Accepted Text => 0000227:0000410
2010-04-15 15:31 msbrown Status Under Review => Resolved
2010-04-15 15:31 msbrown Resolution Open => Accepted As Marked
2010-08-27 12:52 ajosey Tag Attached: tc1-2008
2013-04-16 13:06 ajosey Status Resolved => Closed