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 767084 - Header cleanup
Header cleanup
Status: RESOLVED FIXED
Product: pygobject
Classification: Bindings
Component: general
Git master
Other Linux
: Normal normal
: ---
Assigned To: Nobody's working on this now (help wanted and appreciated)
Python bindings maintainers
Depends on:
Blocks:
 
 
Reported: 2016-05-31 17:37 UTC by Christoph Reiter (lazka)
Modified: 2016-06-01 19:24 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Remove pygi.h and pygi-private.h (24.35 KB, patch)
2016-05-31 17:38 UTC, Christoph Reiter (lazka)
committed Details | Review
Merge pyglib-private.h into pyglib.h (5.25 KB, patch)
2016-05-31 17:38 UTC, Christoph Reiter (lazka)
committed Details | Review
Remove pygobject-private.h and rename pygobject.c to pygobject-object.c (180.27 KB, patch)
2016-05-31 17:38 UTC, Christoph Reiter (lazka)
none Details | Review
Remove pygobject-external.h (2.71 KB, patch)
2016-05-31 17:39 UTC, Christoph Reiter (lazka)
committed Details | Review
Remove pygobject-private.h and rename pygobject.c to pygobject-object.c (180.55 KB, patch)
2016-06-01 05:49 UTC, Christoph Reiter (lazka)
committed Details | Review

Description Christoph Reiter (lazka) 2016-05-31 17:37:32 UTC
This removes all the "private" header files and moves their content to the header files of the implementations. As far as I can see there is no reason to have any private headers as only pygobject.h gets installed/exported.
Imo makes things more structured and readable.
Comment 1 Christoph Reiter (lazka) 2016-05-31 17:38:05 UTC
Created attachment 328837 [details] [review]
Remove pygi.h and pygi-private.h

Instead include things where needed.
Comment 2 Christoph Reiter (lazka) 2016-05-31 17:38:31 UTC
Created attachment 328838 [details] [review]
Merge pyglib-private.h into pyglib.h

No need for another header
Comment 3 Christoph Reiter (lazka) 2016-05-31 17:38:58 UTC
Created attachment 328839 [details] [review]
Remove pygobject-private.h and rename pygobject.c to  pygobject-object.c

Move all the random declarations in pygobject-private.h to their
respective header files. Rename pygobject.c to pygobject-object.c
so it's clearer that it's not the implementation of pygobject.h.
Add a new pygobject-internal.h which includes pygobject.h
with _INSIDE_PYGOBJECT_ defined like pygobject-private.h did.
Comment 4 Christoph Reiter (lazka) 2016-05-31 17:39:33 UTC
Created attachment 328840 [details] [review]
Remove pygobject-external.h

It's not used any more
Comment 5 Simon Feltman 2016-06-01 03:22:16 UTC
Review of attachment 328837 [details] [review]:

Sure.
Comment 6 Simon Feltman 2016-06-01 03:23:05 UTC
Review of attachment 328838 [details] [review]:

LGTM
Comment 7 Simon Feltman 2016-06-01 03:32:56 UTC
Review of attachment 328839 [details] [review]:

I think there is probably a lot useful history stored in pygobject.c. Can you add comments/notes along with example git commands to the commit message to help people with historical analysis/blaming? Something like:

To find old history, use:
 git blame <this-sha>^ -- pygobject.c
Comment 8 Simon Feltman 2016-06-01 03:34:18 UTC
Review of attachment 328840 [details] [review]:

Nice work, thanks for all the cleanup!
Comment 9 Christoph Reiter (lazka) 2016-06-01 05:42:06 UTC
(In reply to Simon Feltman from comment #7)
> Review of attachment 328839 [details] [review] [review]:
> 
> I think there is probably a lot useful history stored in pygobject.c. Can
> you add comments/notes along with example git commands to the commit message
> to help people with historical analysis/blaming? Something like:
> 
> To find old history, use:
>  git blame <this-sha>^ -- pygobject.c

git blame should work as before (it even contains data form the last two renames of that file)

The only things that might be useful is a note that "git log --follow pygobject-object.c" follows renames and for the gnome git web interface that "https://git.gnome.org/browse/pygobject/log/gi/pygobject.c?id=6b702c052e9f26e809cff494f0c896d17a514c64" will show the log of the previous file.

Should I include those two? Or anything else?

-----

Thanks for the quick reviews!
Comment 10 Christoph Reiter (lazka) 2016-06-01 05:49:20 UTC
Created attachment 328856 [details] [review]
Remove pygobject-private.h and rename pygobject.c to  pygobject-object.c

Move all the random declarations in pygobject-private.h to their
respective header files. Rename pygobject.c to pygobject-object.c
so it's clearer that it's not the implementation of pygobject.h.
Add a new pygobject-internal.h which includes pygobject.h
with _INSIDE_PYGOBJECT_ defined like pygobject-private.h did.

In case you are looking at the git log and end up here due to the
rename try:

  git log --follow pygobject-object.c

or on the web interface go to the history of the old file name:

https://git.gnome.org/browse/pygobject/log/gi/pygobject.c?id=6b702c052e9f26e809cff494f0c896d17a514c64
Comment 11 Simon Feltman 2016-06-01 06:30:26 UTC
Review of attachment 328856 [details] [review]:

Ok, thanks for the update.