comparison src/perl.c @ 565:7209b474bdc3

[gaim-migrate @ 575] perl changes committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Tue, 01 Aug 2000 05:10:53 +0000
parents db6d5d24d9a1
children 9566a53cde23
comparison
equal deleted inserted replaced
564:c6f1e88ec3cb 565:7209b474bdc3
27 #include "../config.h" 27 #include "../config.h"
28 #endif 28 #endif
29 #undef PACKAGE 29 #undef PACKAGE
30 30
31 /* #ifdef USE_PERL */ 31 /* #ifdef USE_PERL */
32 #if 0 /* still has problems */ 32 #if 0
33 33
34 #include <EXTERN.h> 34 #include <EXTERN.h>
35 #ifndef _SEM_SEMUN_UNDEFINED 35 #ifndef _SEM_SEMUN_UNDEFINED
36 #define HAS_UNION_SEMUN 36 #define HAS_UNION_SEMUN
37 #endif 37 #endif
172 } 172 }
173 } 173 }
174 174
175 void perl_end() 175 void perl_end()
176 { 176 {
177 struct perlscript *scp;
178
179 while (perl_list) {
180 scp = perl_list->data;
181 perl_list = g_list_remove(perl_list, scp);
182 if (scp->shutdowncallback[0])
183 execute_perl(scp->shutdowncallback, "");
184 g_free(scp->name);
185 g_free(scp->version);
186 g_free(scp->shutdowncallback);
187 g_free(scp);
188 }
189
177 if (my_perl != NULL) { 190 if (my_perl != NULL) {
178 perl_destruct(my_perl); 191 perl_destruct(my_perl);
179 perl_free(my_perl); 192 perl_free(my_perl);
180 my_perl = NULL; 193 my_perl = NULL;
181 } 194 }
240 253
241 /* XS (XS_AIM_dcc_list); /* wha? */ 254 /* XS (XS_AIM_dcc_list); /* wha? */
242 255
243 XS (XS_AIM_get_info) 256 XS (XS_AIM_get_info)
244 { 257 {
258 int junk;
259 dXSARGS;
260 items = 0;
261
262 switch(atoi(SvPV(ST(0), junk))) {
263 case 0:
264 XST_mPV(0, VERSION);
265 break;
266 case 1:
267 XST_mPV(0, current_user->username);
268 break;
269 default:
270 XST_mPV(0, "Error2");
271 }
272
273 XSRETURN(1);
245 } 274 }
246 275
247 #endif /* USE_PERL */ 276 #endif /* USE_PERL */