PerlGameDev / SDL

Rehashing the old perl SDL binding on cpan.org
http://search.cpan.org/dist/SDL
GNU General Public License v2.0
81 stars 29 forks source link

Fix reference-counting in set_event_filter #308

Open cjwatson opened 6 months ago

cjwatson commented 6 months ago

This previously resulted in the following test failure with Perl 5.38.2 on Debian unstable (https://bugs.debian.org/1064761):

t/core_events.t ................. 1/? Can't use an undefined value as a subroutine reference during global destruction.
t/core_events.t ................. Dubious, test returned 22 (wstat 5632, 0x1600)
All 691 subtests passed
        (less 1 skipped subtest: 690 okay)
ppisar commented 6 months ago

This issue happens for me when upgrading SDL2 from 2.28.5 to 2.30.1. I build Perl SDL against sdl12-compat-1.2.68 which is a wrapper around SDL2. I confirm that this patch fixes my test failure.