[Pidgin] #11431: Signals no longer work in Perl plugins

Pidgin trac at pidgin.im
Thu Mar 4 04:29:45 EST 2010


#11431: Signals no longer work in Perl plugins
----------------------+-----------------------------------------------------
 Reporter:  dharding  |        Owner:  MarkDoliner
     Type:  defect    |       Status:  new        
Milestone:  2.7.0     |    Component:  plugins    
  Version:  2.6.6     |   Resolution:             
 Keywords:  perl      |  
----------------------+-----------------------------------------------------

Comment(by MarkDoliner):

 > In libpurple/status.c, va_arg is invoked within a loop in a single
 function that process all the arguments
 (purple_status_set_active_with_attrs or
 purple_status_type_add_attrs_vargs). In both of those cases, args is a
 local variable that va_arg is able to update, so everything works fine.
 > [[BR]]
 > [[BR]]
 > In the Perl code, perl_signal_cb loops over the args, but for each one
 calls purple_perl_sv_from_vargs, which is the function that actually calls
 va_arg.

 Ahhh, that makes a lot of sense.  Thanks for clarifying.

 The original code behaved correctly, right?  It just had a spurious
 warning?
 {{{
 perl-handlers.c: In function ‘perl_signal_cb’:
 perl-handlers.c:306: warning: passing argument 2 of
 ‘purple_perl_sv_from_vargs’ from incompatible pointer type
 perl-common.h:69: note: expected ‘struct __va_list_tag (*)[1]’ but
 argument is of type ‘struct __va_list_tag *’
 }}}

 I reverted my change, since it was clearly wrong (that's probably going to
 make your patches not apply anymore--sorry about that, please don't
 recreate them on my account, if we decide we like one of your patches I
 can make the appropriate changes by hand).

 But I'm leaning toward just adding a cast for that specific case.  How do
 you feel about the attached patch coupled with
 http://developer.pidgin.im/viewmtn/revision/info/67de3fff150c538c01ca66706c29a8f19cbfeff1?

-- 
Ticket URL: <http://developer.pidgin.im/ticket/11431#comment:10>
Pidgin <http://pidgin.im>
Pidgin


More information about the Tracker mailing list