This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 1/6] New function null_stream


On 2017-01-18 10:01, Luis Machado wrote:
On 01/18/2017 08:57 AM, Simon Marchi wrote:
On 2017-01-18 09:53, Luis Machado wrote:
We're setting stream to NULL at the top of the function and then
checking if it is NULL (it obviously is) right after that? Am i
missing something?

The "static" :).

Oh, that's what i was missing!

Can't we have a clearer way of reusing this stream? It looks cryptic
this way (at least i think it looks cryptic).

With Pedro's ui_file c++ification series, there is a null_file specialization of ui_file, and it's just a global object that you can reference.

Search for "null_file null_stream" in

  https://sourceware.org/ml/gdb-patches/2017-01/msg00312.html


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]