Changeset e3cbd65
- Timestamp:
- Oct 26, 2009, 4:09:38 PM (15 years ago)
- Branches:
- master, release-1.10, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
- Children:
- fe7616e
- Parents:
- 3cc4bfc
- git-author:
- David Benjamin <davidben@mit.edu> (10/05/09 22:53:21)
- git-committer:
- David Benjamin <davidben@mit.edu> (10/26/09 16:09:38)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
perlglue.xs
rbdbec0a re3cbd65 334 334 all_filters() 335 335 PREINIT: 336 AV *filters;337 336 const owl_list *fl; 338 const owl_filter *f;339 int i;340 337 CODE: 341 338 { 342 339 fl = owl_global_get_filterlist(&g); 343 filters = newAV(); 344 for(i=0;i<owl_list_get_size(fl);i++) { 345 f = owl_list_get_element(fl, i); 346 av_push(filters, owl_new_sv(owl_filter_get_name(f))); 347 } 348 RETVAL = filters; 340 RETVAL = owl_new_av(fl, (SV*(*)(const void*))owl_filter_to_sv); 349 341 sv_2mortal((SV*)RETVAL); 350 342 } … … 355 347 all_styles() 356 348 PREINIT: 357 AV *styles;358 349 owl_list l; 359 const char *name;360 int i;361 350 CODE: 362 351 { 363 352 owl_list_create(&l); 364 353 owl_global_get_style_names(&g, &l); 365 styles = newAV(); 366 for(i=0;i<owl_list_get_size(&l);i++) { 367 name = owl_list_get_element(&l, i); 368 av_push(styles, owl_new_sv(name)); 369 } 370 RETVAL = styles; 354 RETVAL = owl_new_av(&l, (SV*(*)(const void*))owl_new_sv); 371 355 sv_2mortal((SV*)RETVAL); 372 356 } … … 380 364 all_variables() 381 365 PREINIT: 382 AV *vars;383 366 owl_list l; 384 const char *name;385 int i;386 367 CODE: 387 368 { 388 369 owl_list_create(&l); 389 370 owl_dict_get_keys(owl_global_get_vardict(&g), &l); 390 vars = newAV(); 391 for(i=0;i<owl_list_get_size(&l);i++) { 392 name = owl_list_get_element(&l, i); 393 av_push(vars, owl_new_sv(name)); 394 } 395 RETVAL = vars; 371 RETVAL = owl_new_av(&l, (SV*(*)(const void*))owl_new_sv); 396 372 sv_2mortal((SV*)RETVAL); 397 373 }
Note: See TracChangeset
for help on using the changeset viewer.