wut ? je créé un objet avec le plus?

On 23/02/2013 14:30, serge-sans-paille wrote:
> In pythran/pythonic++/core/file.h:
> 
>> +					// If we are at eof on reading mode throw exception
>> +						throw StopIteration("file.next() : EOF reached.");
>> +					}
>> +					return readline();
>> +				}
>> +
>> +				core::string read(int size = -1) {
>> +					if(not is_open) throw ValueError("I/O operation on closed file");
>> +					if (mode.find_first_of("r+") == std::string::npos)
>> +						throw IOError("File not open for reading");
>> +					if (size == 0 | (feof(**data) && mode.find_first_of("ra") == std::string::npos) ) return core::string();
>> +					int curr_pos = tell();
>> +					seek(0, SEEK_END);
>> +					size = size < 0 ? tell() - curr_pos : size;
>> +					seek(curr_pos);
>> +					char *content = new char[size+1];
> 
> could be char content[1+size] to avoid the new/delete, but wait... it's
> a GNU extension, so forget about it
> 
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/serge-sans-paille/pythran/pull/49/files#r3126655>.
>