GNOME Bugzilla – Bug 665266
SvMAGIC_set not defined for perl-5.8.0
Last modified: 2012-01-07 14:09:38 UTC
This report also filed at https://rt.cpan.org/Ticket/Display.html?id=72830 (by mistake). Hi, Not sure when that symbol first arrived on the scene (5.009003 perhaps ?), but it's not be found in my build of perl-5.8.0. Therefore, if we really want Glib to be buildable using 5.8.0 we need the following patch to gperl.h (or something similar). --- gperl.h_orig 2011-11-30 19:15:41 +1100 +++ gperl.h 2011-11-30 19:33:25 +1100 @@ -36,6 +36,13 @@ #include <glib-object.h> +/* copied from ppport.h */ +#ifndef SvMAGIC_set +# define SvMAGIC_set(sv, val) \ + STMT_START { assert(SvTYPE(sv) >= SVt_PVMG); \ + (((XPVMG*) SvANY(sv))->xmg_magic = (val)); } STMT_END +#endif + /* * filenames */ Cheers, Rob
Sorry - I should've specified this applies to version 1.241 of Glib. No such problem with version 1.224.
Created attachment 203173 [details] [review] Add a fallback implementation of SvMAGIC_set Interesting. PPPort says 5.9.3, but my 5.8.8 actually has that macro already. Regardless, can you try this patch? Do Glib's and Gtk2's test suites still pass after this? (Or, at least, do not fail more tests?)
It's in my 5.8.8, too - probably first appeared in 5.9.3, then backported to 5.8.8. (I'm guessing that 5.8.8 came out *after* 5.9.3). Switching the definition from gperl.h to GObject.xs (as you have done) also works fine. Thanks Torsten. Cheers, Rob
Alright, pushed to master. I also fixed what perl 5.8.0 considers a syntax error in Glib::GenPod.