jigar-joshi / libjingle

Automatically exported from code.google.com/p/libjingle
0 stars 0 forks source link

PATCH: Avoid global initialization order problem with QName default constructor. #137

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The buzz::QName default constructor uses QN_EMPTY which is a global variable. 
Hence, using an uninitialized QName global in a module different from the one 
that QN_EMPTY is defined in introduce a global initialization order problem. 
The attached patch moves QN_EMPTY (and QN_XMLNS) into xmlconstants.h, and uses 
a function static variable to avoid the global initialization order problem.

PS: Is this the correct place to submit patches?

Original issue reported on code.google.com by bla...@suitabletech.com on 8 Feb 2011 at 10:34

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by juberti@google.com on 8 Dec 2011 at 9:46