Re: Sanity check - making a static initializer constant

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 10/10/2013 08:50 AM, Jonathan Wakely wrote:
> On 9 October 2013 20:10, Ian Pilcher wrote:
>> As far as I know, my options are:
>>
>> 1.  Live with the current scheme.
>>
>> 2.  Change "matches" in the function to an automatic variable.
>>
>> 3.  Change the "regex" member of "struct regex" to a pointer and
>>     create separate foo_regex, bar_regex, etc. objects.  I could then
>>     make the "regexes" array constant.
>>
>> Am I missing anything?
> 
> 4. Use C++ instead of C, which allows those initializers.
> 
> Probably not what you were looking for though.
> 

Yeah, I'll pass.  Full marks for creativity, though!

-- 
========================================================================
Ian Pilcher                                         arequipeno@xxxxxxxxx
Sometimes there's nothing left to do but crash and burn...or die trying.
========================================================================




[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux