25.10.2013 18:56, Rainer Gerhards:
I'll look at it.
But if you are going to allow such constructs:
set $!var = func( func_returning_object () )
then you need to free temporary object somewhere. Reference counting is a
simplest way to do it.
well. json_object_object_get() is the only function that does not add a new
reference, so there is no (kind of) temporary object created. As I said, I
thought there's a bug and "fixed" it. It turned out that the fix does
double-frees, and so I went back to the doc...
OK, I see. But, in turn, there was no functions returning objects, as
far as I can see. If we introduce re_extract_all, this function will
create a temporary object and return it to the caller. If the caller is,
in turn, a function, then the object must be freed after use, just like
strings do. Where am I wrong?
argh, I simply believed you there were currently none (I implied that, the
var issue seems to take its toll...). So I added a second one. OK, will
clean up again.
I'm sorry.
The question still remains why I did not use that function. Usually, there
is a reason for this. But that's not any more for today.
From git it seemes that you just have forgotten it.
--
Pavel Levshin
_______________________________________________
rsyslog mailing list
http://lists.adiscon.net/mailman/listinfo/rsyslog
http://www.rsyslog.com/professional-services/
What's up with rsyslog? Follow https://twitter.com/rgerhards
NOTE WELL: This is a PUBLIC mailing list, posts are ARCHIVED by a myriad of
sites beyond our control. PLEASE UNSUBSCRIBE and DO NOT POST if you DON'T LIKE
THAT.