Opened 7 years ago

Closed 7 years ago

#54543 closed defect (fixed)

glib2-devel: projects using glib-genmarshal with C++ code break

Reported by: Ionic (Mihai Moldovan) Owned by: ryandesign (Ryan Carsten Schmidt)
Priority: Normal Milestone:
Component: ports Version:
Keywords: haspatch Cc:
Port: glib2-devel

Description

glib2 switched from a C-based glib-genmarshal tool to a new implementation in Python.

Since then, projects using glib-genmarshal to generate code with parameters --header --body break if they compile the resulting file as C++ code, since the new implementation transparently maps --header --body to --body --prototypes, which does not wrap prototypes in G_{BEGIN,END}_DECLS. A separate header file is still wrapped correctly, leading to linking errors due to name mangling.

The old tool did wrap the whole implementation file in G_{BEGIN,END}_DECLS, so that used to work.

Upstream bug report: https://bugzilla.gnome.org/show_bug.cgi?id=785554

Will attach a patch backporting that.

Attachments (1)

glib2-devel-genmarshal-review.patch (3.1 KB) - added by Ionic (Mihai Moldovan) 7 years ago.

Download all attachments as: .zip

Change History (4)

Changed 7 years ago by Ionic (Mihai Moldovan)

comment:1 Changed 7 years ago by Ionic (Mihai Moldovan)

Owner: set to ryandesign
Status: newassigned

Please review. I'll commit this if you agree.

comment:2 Changed 7 years ago by ryandesign (Ryan Carsten Schmidt)

Keywords: haspatch added

I'm not competent to evaluate the patch. If upstream agrees that's the correct fix, feel free to commit it.

comment:3 Changed 7 years ago by Ionic (Mihai Moldovan)

Resolution: fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.