Because a FILE can be shared between multiple core:files

On 01/03/2013 01:33, joker-eph wrote:
> In pythran/pythonic++/core/file.h:
> 
>> +				file_iterator& operator++();
>> +				core::string operator*() const;
>> +			};
>> +
>> +			struct _file{
>> +					FILE* f;
>> +					_file() : f(nullptr) {}
>> +					_file(core::string const& filename, core::string const& strmode = "r") : f(fopen(filename.c_str(), strmode.c_str())){}
>> +					FILE* operator*() const {return f;}
>> +					~_file() {if(f) fclose(f);}
>> +			};
>> +
>> +			class file {
>> +
>> +                typedef _file container_type;
>> +                impl::shared_ref<container_type> data; 
> 
> Why a shared_ref here? why not _file data?
> 
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/serge-sans-paille/pythran/pull/53/files#r3198777>.
>