After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 87591 - GTK+ merged docs has notions of free() which isn't used in gtkmm.
GTK+ merged docs has notions of free() which isn't used in gtkmm.
Status: RESOLVED FIXED
Product: gtkmm
Classification: Bindings
Component: reference documentation
2.0
Other Linux
: Normal minor
: ---
Assigned To: gtkmm-forge
gtkmm-forge
Depends on:
Blocks:
 
 
Reported: 2002-07-07 19:25 UTC by Morten Brix Pedersen
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch to correct documentation and two small unrelated changes. (4.81 KB, patch)
2002-07-12 14:36 UTC, Morten Brix Pedersen
none Details | Review

Description Morten Brix Pedersen 2002-07-07 19:25:25 UTC
The documentation for Gtk::TextView::get_attributes():

   The return value is a copy owned by the caller of this function, and
should be freed. 

Am I right to assume that this line shouldn't be there? Since you don't
"free" things in C++, it will be destroyed when it gets out of scope, which
is what any C++ programmer would expect.

I will create a patch if my assumptions are right.
Comment 1 Murray Cumming 2002-07-08 17:21:00 UTC
Yes, you are correct. You might need to use the gtk_docs_override.xml
file for this. You mean get_default_attributes(), I guess.
Comment 2 Morten Brix Pedersen 2002-07-12 14:36:14 UTC
Created attachment 9831 [details] [review]
Patch to correct documentation and two small unrelated changes.
Comment 3 Morten Brix Pedersen 2002-07-12 14:41:01 UTC
Here's the patch.

I actually couldn't get gtk_docs_override.xml working locally, and it
doesn't seem to work in the generated docs on http://gtkmm.org/gtkmm2/
with the example which was there already.

Also, while searching through gtk_docs.xml for the word "free", it
seems that many functions talks about "freeing" things etc. So this
bug is not closed yet, it requires a bit more work..
Comment 4 Murray Cumming 2002-07-13 20:51:48 UTC
Are you actually generating the Doxygen HTML? It seems to be working.
I don't see any free here:
http://www.gtkmm.org/gtkmm2/reference/html/classGtk_1_1TextView.html#a56

And the example is gtk_box_pack_start(), which is hand-coded anyway.

So, would you like to provide a similar patche for the other "free"
occurences? Do try to make your patches solve just one thing at a time
instead of doing unrelated stuff in the same patch.
Comment 5 Morten Brix Pedersen 2002-07-13 21:18:34 UTC
I was just testing with the example since *that* should be working. I
don't understand what you mean that it's hand-coded. All I know is
that there is no documentation for Gtk::Box::pack_start(). Glad to see
it working though.

Currently I don't have time to make all the non-free changes.
Comment 6 Murray Cumming 2002-07-13 22:12:19 UTC
pack_start() doesn't use _WRAP_METHOD() so it doesn't use
auto-generate any reference docs. It's just regular C++.
Comment 7 Murray Cumming 2002-07-16 11:22:45 UTC
You really need to search the HTML output, because the C docs are not
used when we custom code a method. I have fixed what I have found by
using grep.