memory freeing necessary?

Havoc Pennington hp at redhat.com
Tue Jul 25 16:33:04 PDT 2006


Matthew Johnson wrote:
> I think _all_ apps should be introspectable. It's a condition of the
> bindings that they provide this, I think a c-api dbus program which
> doesn't should be considered a bug.

A legitimate reason not to mess with this might be an interface that 
isn't supposed to be any kind of public API and is only used by an app 
to talk to itself.

Also of course many dynamic bindings won't be able to do this without 
making the programmer do lots of annoying/painful typing that can't even 
be mechanically validated.

>> I think I actually said "exceptions are part of the defined semantics 
>> of a method, even though they aren't in the type signature, and you 
>> have to specify non-compiler-checked semantics in an ABI anyway and 
>> exceptions would fall under that spec"
>>
>> IOW exceptions can't be added if they break the semantics, so your 
>> previous bullet point applies ;-)
> 
> So can we please have annotations that list them? If it's part of the
> API/ABI it should be in the introspection data.

Please re-read what I said above, and the huge previous thread on this.

If your statement is true "If it's part of the
API/ABI it should be in the introspection data" then one of two things 
is the case.

1) By "introspection data" you mean "the docs in the introspection 
data," something I already agreed with in the previous thread and nobody 
has disagreed with.

2) By "introspection data" you mean "method signature" in which case
I will leave you the task of including the complete documented semantics 
of all methods in the type signature of methods, and wait to hear back 
on how that is possible.

Face it, if you have a method "void Frobate()" that frobates, and you 
make it frobnicate, and the docs say it frobates, then you broke ABI. 
And there is no way to put that in the signature.

For reasons covered extensively in the previous thread, there is no 
meaningful way to put exceptions in the the dbus signature either, so 
they are not in the signature; they are in the documentation of the 
semantic behavior of the ABI.

Which is also the case for _every_ common language except Java, and also 
the case for many recent Java APIs such as EJB3.  So let's stop acting 
like it's some sort of radical choice.

Havoc



More information about the dbus mailing list