Mercurial > pidgin
comparison plugins/perl/perl.c @ 6536:9767117bc47e
[gaim-migrate @ 7053]
Fixed some C99isms.
committer: Tailor Script <tailor@pidgin.im>
author | Christian Hammond <chipx86@chipx86.com> |
---|---|
date | Thu, 21 Aug 2003 01:33:48 +0000 |
parents | 7c42b8ca3222 |
children | ed796f756237 |
comparison
equal
deleted
inserted
replaced
6535:cf1b14665c24 | 6536:9767117bc47e |
---|---|
310 | 310 |
311 plugin->handle = plugin->path; | 311 plugin->handle = plugin->path; |
312 | 312 |
313 execute_perl("load_n_eval", 1, atmp); | 313 execute_perl("load_n_eval", 1, atmp); |
314 | 314 |
315 dSP; | 315 { |
316 ENTER; | 316 dSP; |
317 SAVETMPS; | 317 ENTER; |
318 PUSHMARK(sp); | 318 SAVETMPS; |
319 XPUSHs(sv_2mortal(gaim_perl_bless_object(plugin, "Gaim::Plugin"))); | 319 PUSHMARK(sp); |
320 PUTBACK; | 320 XPUSHs(sv_2mortal(gaim_perl_bless_object(plugin, "Gaim::Plugin"))); |
321 | 321 PUTBACK; |
322 perl_call_pv(gps->load_sub, G_EVAL | G_SCALAR); | 322 |
323 SPAGAIN; | 323 perl_call_pv(gps->load_sub, G_EVAL | G_SCALAR); |
324 | 324 SPAGAIN; |
325 if (SvTRUE(ERRSV)) { | 325 |
326 int len; | 326 if (SvTRUE(ERRSV)) { |
327 | 327 int len; |
328 gaim_debug(GAIM_DEBUG_ERROR, "perl", | 328 |
329 "Perl function %s exited abnormally: %s\n", | 329 gaim_debug(GAIM_DEBUG_ERROR, "perl", |
330 gps->load_sub, SvPV(ERRSV, len)); | 330 "Perl function %s exited abnormally: %s\n", |
331 gps->load_sub, SvPV(ERRSV, len)); | |
332 } | |
333 | |
334 PUTBACK; | |
335 FREETMPS; | |
336 LEAVE; | |
331 } | 337 } |
332 | |
333 PUTBACK; | |
334 FREETMPS; | |
335 LEAVE; | |
336 | 338 |
337 return TRUE; | 339 return TRUE; |
338 } | 340 } |
339 | 341 |
340 static gboolean | 342 static gboolean |
345 if (gps == NULL || gps->unload_sub == NULL) | 347 if (gps == NULL || gps->unload_sub == NULL) |
346 return FALSE; | 348 return FALSE; |
347 | 349 |
348 gaim_debug(GAIM_DEBUG_INFO, "perl", "Unloading perl script\n"); | 350 gaim_debug(GAIM_DEBUG_INFO, "perl", "Unloading perl script\n"); |
349 | 351 |
350 dSP; | 352 { |
351 ENTER; | 353 dSP; |
352 SAVETMPS; | 354 ENTER; |
353 PUSHMARK(sp); | 355 SAVETMPS; |
354 XPUSHs(sv_2mortal(gaim_perl_bless_object(plugin, "Gaim::Plugin"))); | 356 PUSHMARK(sp); |
355 PUTBACK; | 357 XPUSHs(sv_2mortal(gaim_perl_bless_object(plugin, "Gaim::Plugin"))); |
356 | 358 PUTBACK; |
357 perl_call_pv(gps->unload_sub, G_EVAL | G_SCALAR); | 359 |
358 SPAGAIN; | 360 perl_call_pv(gps->unload_sub, G_EVAL | G_SCALAR); |
359 | 361 SPAGAIN; |
360 if (SvTRUE(ERRSV)) { | 362 |
361 int len; | 363 if (SvTRUE(ERRSV)) { |
362 | 364 int len; |
363 gaim_debug(GAIM_DEBUG_ERROR, "perl", | 365 |
364 "Perl function %s exited abnormally: %s\n", | 366 gaim_debug(GAIM_DEBUG_ERROR, "perl", |
365 gps->load_sub, SvPV(ERRSV, len)); | 367 "Perl function %s exited abnormally: %s\n", |
368 gps->load_sub, SvPV(ERRSV, len)); | |
369 } | |
370 | |
371 | |
372 PUTBACK; | |
373 FREETMPS; | |
374 LEAVE; | |
366 } | 375 } |
367 | |
368 | |
369 PUTBACK; | |
370 FREETMPS; | |
371 LEAVE; | |
372 | 376 |
373 gaim_signals_disconnect_by_handle(plugin); | 377 gaim_signals_disconnect_by_handle(plugin); |
374 gaim_perl_timeout_clear_for_plugin(plugin); | 378 gaim_perl_timeout_clear_for_plugin(plugin); |
375 | 379 |
376 return TRUE; | 380 return TRUE; |