Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 75294
Collapse All | Expand All

(-)file_not_specified_in_diff (-123 / +89 lines)
Line  Link Here
       (http://svn.collab.net/repos/svn)
       (http://svn.collab.net/repos/svn)
1
r12144:  clkao | 2004-12-04T15:13:55.095399Z
1
r12144:  clkao | 2004-12-04T15:13:55.095399Z
2
* Pass pool to methods in Perl for close_baton.
2
* Pass pool to methods in Perl for close_baton.
3
* Use a hash to cache SWIG_TypeQuery results.
3
* Use a hash to cache SWIG_TypeQuery results.
4
4
5
  * libsvn_swig_perl/swigutil_pl.c:
5
  * libsvn_swig_perl/swigutil_pl.c:
6
    (close_baton): Pass pool to methods in Perl.
6
    (close_baton): Pass pool to methods in Perl.
7
      Use svn_swig_pl_callback_thunk.
7
      Use svn_swig_pl_callback_thunk.
8
8
9
    (_swig_perl_type_query): New.
9
    (_swig_perl_type_query): New.
10
    (_SWIG_TYPE): New.
10
    (_SWIG_TYPE): New.
11
 
11
 
12
    Change callers of SWIG_TypeQuery to use _swig_perl_type_query.
12
    Change callers of SWIG_TypeQuery to use _swig_perl_type_query.
13
-- subversion/bindings/swig/perl/libsvn_swig_perl/swigutil_pl.c  (revision 12471)
13
++ subversion/bindings/swig/perl/libsvn_swig_perl/swigutil_pl.c  (patch 11x level 1)
Lines 31-36 Link Here
31
31
32
#include "swigutil_pl.h"
32
#include "swigutil_pl.h"
33
33
34
/* cache SWIG_TypeQuery results in a perl hash */
35
static HV *type_cache = NULL;
36
37
#define _SWIG_TYPE(name) _swig_perl_type_query(name, sizeof (name)-1)
38
#define POOLINFO         _SWIG_TYPE("apr_pool_t *")
39
40
static swig_type_info *_swig_perl_type_query (const char *typename, U32 klen)
41
{
42
    SV **type_info;
43
    swig_type_info *tinfo;
44
45
    if (!type_cache)
46
        type_cache = newHV ();
47
48
    if (klen == 0)
49
        klen = strlen (typename);
50
51
    if ((type_info = hv_fetch(type_cache, typename, klen, 0)))
52
        return (swig_type_info *) (SvIV (*type_info));
53
54
    tinfo = SWIG_TypeQuery(typename);
55
    hv_store(type_cache, typename, klen, newSViv ((IV)tinfo), 0);
56
57
    return tinfo;
58
}
59
34
/* element convertors for perl -> c */
60
/* element convertors for perl -> c */
35
typedef void *(*pl_element_converter_t)(SV *value, void *ctx, 
61
typedef void *(*pl_element_converter_t)(SV *value, void *ctx, 
36
                                        apr_pool_t *pool);
62
                                        apr_pool_t *pool);
Lines 97-103 Link Here
97
                                             const char *typename,
123
                                             const char *typename,
98
                                             apr_pool_t *pool)
124
                                             apr_pool_t *pool)
99
{
125
{
100
    swig_type_info *tinfo = SWIG_TypeQuery(typename);
126
    swig_type_info *tinfo = _swig_perl_type_query(typename, 0);
101
    return svn_swig_pl_objs_to_hash (source, tinfo, pool);
127
    return svn_swig_pl_objs_to_hash (source, tinfo, pool);
102
}
128
}
103
129
Lines 297-303 Link Here
297
	case 'S': /* swig object */
323
	case 'S': /* swig object */
298
	    o = va_arg (ap, void *);
324
	    o = va_arg (ap, void *);
299
	    t = va_arg (ap, swig_type_info *);
325
	    t = va_arg (ap, swig_type_info *);
300
  
326
301
	    obj = sv_newmortal ();
327
	    obj = sv_newmortal ();
302
	    SWIG_MakePtr (obj, o, t, 0);
328
	    SWIG_MakePtr (obj, o, t, 0);
303
	    XPUSHs(obj);
329
	    XPUSHs(obj);
Lines 411-447 Link Here
411
    return newb;
437
    return newb;
412
}
438
}
413
439
414
static svn_error_t * close_baton(void *baton, const char *method)
440
static svn_error_t * close_baton(void *baton, const char *method, apr_pool_t *pool)
415
{
441
{
416
    item_baton *ib = baton;
442
    item_baton *ib = baton;
417
    dSP ;
418
443
419
    ENTER ;
444
    if (ib->baton) {
420
    SAVETMPS ;
445
        SVN_ERR (svn_swig_pl_callback_thunk (CALL_METHOD,
446
                                             (void *)method, NULL,
447
                                             "OOS", ib->editor, ib->baton,
448
                                             pool, POOLINFO));
449
        SvREFCNT_dec(ib->baton);
450
    }
451
    else {
452
        SVN_ERR (svn_swig_pl_callback_thunk (CALL_METHOD,
453
                                             (void *)method, NULL,
454
                                             "OS", ib->editor, pool, POOLINFO));
455
    }
421
456
422
    PUSHMARK(SP) ;
423
    XPUSHs(ib->editor);
424
425
    if (ib->baton)
426
	XPUSHs(ib->baton);
427
428
    PUTBACK;
429
430
    call_method(method, G_DISCARD);
431
432
    /* check result? */
433
434
    SvREFCNT_dec(ib->editor);
457
    SvREFCNT_dec(ib->editor);
435
    if (ib->baton)
436
	SvREFCNT_dec(ib->baton);
437
438
#ifdef SVN_DEBUG
439
    ib->editor = ib->baton = NULL;
440
#endif
441
442
    FREETMPS ;
443
    LEAVE ;
444
445
    return SVN_NO_ERROR;
458
    return SVN_NO_ERROR;
446
}
459
}
447
460
Lines 464-476 Link Here
464
                                     void **root_baton)
477
                                     void **root_baton)
465
{
478
{
466
    item_baton *ib = edit_baton;
479
    item_baton *ib = edit_baton;
467
    swig_type_info *poolinfo = SWIG_TypeQuery("apr_pool_t *");
468
    SV *result;
480
    SV *result;
469
481
470
    SVN_ERR (svn_swig_pl_callback_thunk (CALL_METHOD,
482
    SVN_ERR (svn_swig_pl_callback_thunk (CALL_METHOD,
471
				         (void *)"open_root", &result,
483
				         (void *)"open_root", &result,
472
				         "OrS", ib->editor, base_revision,
484
				         "OrS", ib->editor, base_revision,
473
				         dir_pool, poolinfo));
485
				         dir_pool, POOLINFO));
474
486
475
    *root_baton = make_baton(dir_pool, ib->editor, result);
487
    *root_baton = make_baton(dir_pool, ib->editor, result);
476
    return SVN_NO_ERROR;
488
    return SVN_NO_ERROR;
Lines 482-493 Link Here
482
                                        apr_pool_t *pool)
494
                                        apr_pool_t *pool)
483
{
495
{
484
    item_baton *ib = parent_baton;
496
    item_baton *ib = parent_baton;
485
    swig_type_info *poolinfo = SWIG_TypeQuery("apr_pool_t *");
486
497
487
    SVN_ERR (svn_swig_pl_callback_thunk (CALL_METHOD,
498
    SVN_ERR (svn_swig_pl_callback_thunk (CALL_METHOD,
488
				         (void *)"delete_entry", NULL,
499
				         (void *)"delete_entry", NULL,
489
				         "OsrOS", ib->editor, path, revision,
500
				         "OsrOS", ib->editor, path, revision,
490
				         ib->baton, pool, poolinfo));
501
				         ib->baton, pool, POOLINFO));
491
    return SVN_NO_ERROR;
502
    return SVN_NO_ERROR;
492
}
503
}
493
504
Lines 499-512 Link Here
499
                                         void **child_baton)
510
                                         void **child_baton)
500
{
511
{
501
    item_baton *ib = parent_baton;
512
    item_baton *ib = parent_baton;
502
    swig_type_info *poolinfo = SWIG_TypeQuery("apr_pool_t *");
503
    SV *result;
513
    SV *result;
504
514
505
    SVN_ERR (svn_swig_pl_callback_thunk (CALL_METHOD,
515
    SVN_ERR (svn_swig_pl_callback_thunk (CALL_METHOD,
506
				         (void *)"add_directory", &result,
516
				         (void *)"add_directory", &result,
507
				         "OsOsrS", ib->editor, path, ib->baton,
517
				         "OsOsrS", ib->editor, path, ib->baton,
508
				         copyfrom_path, copyfrom_revision, 
518
				         copyfrom_path, copyfrom_revision, 
509
				         dir_pool, poolinfo));
519
				         dir_pool, POOLINFO));
510
    *child_baton = make_baton(dir_pool, ib->editor, result);
520
    *child_baton = make_baton(dir_pool, ib->editor, result);
511
    return SVN_NO_ERROR;
521
    return SVN_NO_ERROR;
512
}
522
}
Lines 519-530 Link Here
519
{
529
{
520
    item_baton *ib = parent_baton;
530
    item_baton *ib = parent_baton;
521
    SV *result;
531
    SV *result;
522
    swig_type_info *poolinfo = SWIG_TypeQuery("apr_pool_t *");
523
532
524
    SVN_ERR (svn_swig_pl_callback_thunk (CALL_METHOD,
533
    SVN_ERR (svn_swig_pl_callback_thunk (CALL_METHOD,
525
				         (void *)"open_directory", &result,
534
				         (void *)"open_directory", &result,
526
				         "OsOrS", ib->editor, path, ib->baton,
535
				         "OsOrS", ib->editor, path, ib->baton,
527
				         base_revision, dir_pool, poolinfo));
536
				         base_revision, dir_pool, POOLINFO));
528
537
529
    *child_baton = make_baton(dir_pool, ib->editor, result);
538
    *child_baton = make_baton(dir_pool, ib->editor, result);
530
539
Lines 537-549 Link Here
537
                                           apr_pool_t *pool)
546
                                           apr_pool_t *pool)
538
{
547
{
539
    item_baton *ib = dir_baton;
548
    item_baton *ib = dir_baton;
540
    swig_type_info *poolinfo = SWIG_TypeQuery("apr_pool_t *");
541
549
542
    SVN_ERR (svn_swig_pl_callback_thunk (CALL_METHOD,
550
    SVN_ERR (svn_swig_pl_callback_thunk (CALL_METHOD,
543
				         (void *)"change_dir_prop", NULL,
551
				         (void *)"change_dir_prop", NULL,
544
				         "OOssS", ib->editor, ib->baton, name,
552
				         "OOssS", ib->editor, ib->baton, name,
545
				         value ? value->data : NULL,
553
				         value ? value->data : NULL,
546
				         pool, poolinfo));
554
				         pool, POOLINFO));
547
555
548
    return SVN_NO_ERROR;
556
    return SVN_NO_ERROR;
549
}
557
}
Lines 551-557 Link Here
551
static svn_error_t * thunk_close_directory(void *dir_baton,
559
static svn_error_t * thunk_close_directory(void *dir_baton,
552
                                           apr_pool_t *pool)
560
                                           apr_pool_t *pool)
553
{
561
{
554
    return close_baton(dir_baton, "close_directory");
562
    return close_baton(dir_baton, "close_directory", pool);
555
}
563
}
556
564
557
static svn_error_t * thunk_absent_directory(const char *path,
565
static svn_error_t * thunk_absent_directory(const char *path,
Lines 559-570 Link Here
559
					    apr_pool_t *pool)
567
					    apr_pool_t *pool)
560
{
568
{
561
    item_baton *ib = parent_baton;
569
    item_baton *ib = parent_baton;
562
    swig_type_info *poolinfo = SWIG_TypeQuery("apr_pool_t *");
563
570
564
    SVN_ERR (svn_swig_pl_callback_thunk (CALL_METHOD,
571
    SVN_ERR (svn_swig_pl_callback_thunk (CALL_METHOD,
565
	   			         (void *)"absent_directory", NULL,
572
	   			         (void *)"absent_directory", NULL,
566
				         "OsOS", ib->editor, path, ib->baton,
573
				         "OsOS", ib->editor, path, ib->baton,
567
				         pool, poolinfo));
574
				         pool, POOLINFO));
568
575
569
    return SVN_NO_ERROR;
576
    return SVN_NO_ERROR;
570
}
577
}
Lines 578-590 Link Here
578
{
585
{
579
    item_baton *ib = parent_baton;
586
    item_baton *ib = parent_baton;
580
    SV *result;
587
    SV *result;
581
    swig_type_info *poolinfo = SWIG_TypeQuery("apr_pool_t *");
582
588
583
    SVN_ERR (svn_swig_pl_callback_thunk (CALL_METHOD,
589
    SVN_ERR (svn_swig_pl_callback_thunk (CALL_METHOD,
584
				         (void *)"add_file", &result,
590
				         (void *)"add_file", &result,
585
				         "OsOsrS", ib->editor, path, ib->baton,
591
				         "OsOsrS", ib->editor, path, ib->baton,
586
				         copyfrom_path, copyfrom_revision,
592
				         copyfrom_path, copyfrom_revision,
587
				         file_pool, poolinfo));
593
				         file_pool, POOLINFO));
588
594
589
    *file_baton = make_baton(file_pool, ib->editor, result);
595
    *file_baton = make_baton(file_pool, ib->editor, result);
590
    return SVN_NO_ERROR;
596
    return SVN_NO_ERROR;
Lines 597-609 Link Here
597
                                     void **file_baton)
603
                                     void **file_baton)
598
{
604
{
599
    item_baton *ib = parent_baton;
605
    item_baton *ib = parent_baton;
600
    swig_type_info *poolinfo = SWIG_TypeQuery("apr_pool_t *");
601
    SV *result;
606
    SV *result;
602
607
603
    SVN_ERR (svn_swig_pl_callback_thunk (CALL_METHOD,
608
    SVN_ERR (svn_swig_pl_callback_thunk (CALL_METHOD,
604
				         (void *)"open_file", &result,
609
				         (void *)"open_file", &result,
605
				         "OsOrS", ib->editor, path, ib->baton,
610
				         "OsOrS", ib->editor, path, ib->baton,
606
				         base_revision, file_pool, poolinfo));
611
				         base_revision, file_pool, POOLINFO));
607
612
608
    *file_baton = make_baton(file_pool, ib->editor, result);
613
    *file_baton = make_baton(file_pool, ib->editor, result);
609
    return SVN_NO_ERROR;
614
    return SVN_NO_ERROR;
Lines 621-627 Link Here
621
        SvREFCNT_dec(handler);
626
        SvREFCNT_dec(handler);
622
    }
627
    }
623
    else {
628
    else {
624
	swig_type_info *tinfo = SWIG_TypeQuery("svn_txdelta_window_t *");
629
	swig_type_info *tinfo = _SWIG_TYPE("svn_txdelta_window_t *");
625
	SVN_ERR (svn_swig_pl_callback_thunk (CALL_SV, handler,
630
	SVN_ERR (svn_swig_pl_callback_thunk (CALL_SV, handler,
626
				             NULL, "S", window, tinfo));
631
				             NULL, "S", window, tinfo));
627
    }
632
    }
Lines 637-654 Link Here
637
                      void **h_baton)
642
                      void **h_baton)
638
{
643
{
639
    item_baton *ib = file_baton;
644
    item_baton *ib = file_baton;
640
    swig_type_info *poolinfo = SWIG_TypeQuery("apr_pool_t *");
641
    SV *result;
645
    SV *result;
642
646
643
    SVN_ERR (svn_swig_pl_callback_thunk (CALL_METHOD,
647
    SVN_ERR (svn_swig_pl_callback_thunk (CALL_METHOD,
644
				         (void *)"apply_textdelta", &result,
648
				         (void *)"apply_textdelta", &result,
645
				         "OOsS", ib->editor, ib->baton,
649
				         "OOsS", ib->editor, ib->baton,
646
					 base_checksum, pool, poolinfo));
650
					 base_checksum, pool, POOLINFO));
647
    if (SvOK(result)) {
651
    if (SvOK(result)) {
648
	if (SvROK(result) && SvTYPE(SvRV(result)) == SVt_PVAV) {
652
	if (SvROK(result) && SvTYPE(SvRV(result)) == SVt_PVAV) {
649
	    swig_type_info *handler_info = 
653
	    swig_type_info *handler_info = 
650
              SWIG_TypeQuery("svn_txdelta_window_handler_t");
654
              _SWIG_TYPE("svn_txdelta_window_handler_t");
651
            swig_type_info *void_info = SWIG_TypeQuery("void *");
655
            swig_type_info *void_info = _SWIG_TYPE("void *");
652
	    AV *array = (AV *)SvRV(result);
656
	    AV *array = (AV *)SvRV(result);
653
657
654
	    if (SWIG_ConvertPtr(*av_fetch (array, 0, 0),
658
	    if (SWIG_ConvertPtr(*av_fetch (array, 0, 0),
Lines 680-692 Link Here
680
                                            apr_pool_t *pool)
684
                                            apr_pool_t *pool)
681
{
685
{
682
    item_baton *ib = file_baton;
686
    item_baton *ib = file_baton;
683
    swig_type_info *poolinfo = SWIG_TypeQuery("apr_pool_t *");
684
687
685
    SVN_ERR (svn_swig_pl_callback_thunk (CALL_METHOD,
688
    SVN_ERR (svn_swig_pl_callback_thunk (CALL_METHOD,
686
				         (void *)"change_file_prop", NULL,
689
				         (void *)"change_file_prop", NULL,
687
				         "OOssS", ib->editor, ib->baton, name,
690
				         "OOssS", ib->editor, ib->baton, name,
688
				         value ? value->data : NULL,
691
				         value ? value->data : NULL,
689
				         pool, poolinfo));
692
				         pool, POOLINFO));
690
  
693
  
691
    return SVN_NO_ERROR;
694
    return SVN_NO_ERROR;
692
}
695
}
Lines 696-715 Link Here
696
                                      apr_pool_t *pool)
699
                                      apr_pool_t *pool)
697
{
700
{
698
    item_baton *ib = file_baton;
701
    item_baton *ib = file_baton;
699
    swig_type_info *poolinfo = SWIG_TypeQuery("apr_pool_t *");
700
702
701
    SVN_ERR (svn_swig_pl_callback_thunk (CALL_METHOD,
703
    SVN_ERR (svn_swig_pl_callback_thunk (CALL_METHOD,
702
				         (void *)"close_file", NULL, "OOsS",
704
				         (void *)"close_file", NULL, "OOsS",
703
				         ib->editor, ib->baton, text_checksum,
705
				         ib->editor, ib->baton, text_checksum,
704
				         pool, poolinfo));
706
				         pool, POOLINFO));
705
707
706
    SvREFCNT_dec(ib->editor);
708
    SvREFCNT_dec(ib->editor);
707
    SvREFCNT_dec(ib->baton);
709
    SvREFCNT_dec(ib->baton);
708
710
709
#ifdef SVN_DEBUG
710
    ib->editor = ib->baton = NULL;
711
#endif
712
713
    return SVN_NO_ERROR;
711
    return SVN_NO_ERROR;
714
}
712
}
715
713
Lines 718-729 Link Here
718
				       apr_pool_t *pool)
716
				       apr_pool_t *pool)
719
{
717
{
720
    item_baton *ib = parent_baton;
718
    item_baton *ib = parent_baton;
721
    swig_type_info *poolinfo = SWIG_TypeQuery("apr_pool_t *");
722
719
723
    SVN_ERR (svn_swig_pl_callback_thunk (CALL_METHOD,
720
    SVN_ERR (svn_swig_pl_callback_thunk (CALL_METHOD,
724
				         (void *)"absent_file", NULL,
721
				         (void *)"absent_file", NULL,
725
				         "OsOS", ib->editor, path, ib->baton,
722
				         "OsOS", ib->editor, path, ib->baton,
726
				         pool, poolinfo));
723
				         pool, POOLINFO));
727
724
728
    return SVN_NO_ERROR;
725
    return SVN_NO_ERROR;
729
}
726
}
Lines 731-743 Link Here
731
static svn_error_t * thunk_close_edit(void *edit_baton,
728
static svn_error_t * thunk_close_edit(void *edit_baton,
732
                                      apr_pool_t *pool)
729
                                      apr_pool_t *pool)
733
{
730
{
734
    return close_baton(edit_baton, "close_edit");
731
    return close_baton(edit_baton, "close_edit", pool);
735
}
732
}
736
733
737
static svn_error_t * thunk_abort_edit(void *edit_baton,
734
static svn_error_t * thunk_abort_edit(void *edit_baton,
738
                                      apr_pool_t *pool)
735
                                      apr_pool_t *pool)
739
{
736
{
740
    return close_baton(edit_baton, "abort_edit");
737
    return close_baton(edit_baton, "abort_edit", pool);
741
}
738
}
742
739
743
void svn_delta_make_editor(svn_delta_editor_t **editor,
740
void svn_delta_make_editor(svn_delta_editor_t **editor,
Lines 777-784 Link Here
777
					    apr_pool_t *pool)
774
					    apr_pool_t *pool)
778
{
775
{
779
    SV *receiver = baton;
776
    SV *receiver = baton;
780
    swig_type_info *poolinfo = SWIG_TypeQuery("apr_pool_t *");
777
    swig_type_info *tinfo = _SWIG_TYPE("svn_log_changed_path_t *");
781
    swig_type_info *tinfo = SWIG_TypeQuery("svn_log_changed_path_t *");
782
778
783
    if (!SvOK(receiver))
779
    if (!SvOK(receiver))
784
	return SVN_NO_ERROR;
780
	return SVN_NO_ERROR;
Lines 788-794 Link Here
788
			        "OrsssS", (changed_paths) ?
784
			        "OrsssS", (changed_paths) ?
789
			        svn_swig_pl_convert_hash(changed_paths, tinfo)
785
			        svn_swig_pl_convert_hash(changed_paths, tinfo)
790
			        : &PL_sv_undef,
786
			        : &PL_sv_undef,
791
			        rev, author, date, msg, pool, poolinfo);
787
			        rev, author, date, msg, pool, POOLINFO);
792
788
793
    return SVN_NO_ERROR;
789
    return SVN_NO_ERROR;
794
}
790
}
Lines 799-812 Link Here
799
                                            apr_pool_t *pool)
795
                                            apr_pool_t *pool)
800
{
796
{
801
    SV *func = baton;
797
    SV *func = baton;
802
    swig_type_info *poolinfo = SWIG_TypeQuery("apr_pool_t *");
803
798
804
    if (!SvOK(func))
799
    if (!SvOK(func))
805
	return SVN_NO_ERROR;
800
	return SVN_NO_ERROR;
806
801
807
    svn_swig_pl_callback_thunk (CALL_SV,
802
    svn_swig_pl_callback_thunk (CALL_SV,
808
			        func, NULL,
803
			        func, NULL,
809
			        "srS", path, revision, pool, poolinfo);
804
			        "srS", path, revision, pool, POOLINFO);
810
805
811
    return SVN_NO_ERROR;
806
    return SVN_NO_ERROR;
812
}
807
}
Lines 818-832 Link Here
818
                                           apr_pool_t *pool)
813
                                           apr_pool_t *pool)
819
{
814
{
820
    SV *func = baton, *result;
815
    SV *func = baton, *result;
821
    swig_type_info *poolinfo = SWIG_TypeQuery("apr_pool_t *");
822
    swig_type_info *rootinfo = SWIG_TypeQuery("svn_fs_root_t *");
823
816
824
    if (!SvOK(func))
817
    if (!SvOK(func))
825
	return SVN_NO_ERROR;
818
	return SVN_NO_ERROR;
826
819
827
    svn_swig_pl_callback_thunk (CALL_SV,
820
    svn_swig_pl_callback_thunk (CALL_SV,
828
			        func, &result,
821
			        func, &result,
829
			        "SsS", root, rootinfo, path, pool, poolinfo);
822
			        "SsS", root, _SWIG_TYPE("svn_fs_root_t *"),
823
                                path, pool, POOLINFO);
830
824
831
    *allowed = SvIV (result);
825
    *allowed = SvIV (result);
832
    SvREFCNT_dec (result);
826
    SvREFCNT_dec (result);
Lines 855-861 Link Here
855
					 apr_pool_t *pool)
849
					 apr_pool_t *pool)
856
{
850
{
857
    SV *result;
851
    SV *result;
858
    swig_type_info *tinfo = SWIG_TypeQuery("apr_file_t *");
852
    swig_type_info *tinfo = _SWIG_TYPE("apr_file_t *");
859
853
860
    svn_swig_pl_callback_thunk (CALL_METHOD, (void *)"open_tmp_file",
854
    svn_swig_pl_callback_thunk (CALL_METHOD, (void *)"open_tmp_file",
861
			        &result, "OS", callback_baton, pool, POOLINFO);
855
			        &result, "OS", callback_baton, pool, POOLINFO);
Lines 902-908 Link Here
902
				   SV *perl_callbacks,
896
				   SV *perl_callbacks,
903
				   apr_pool_t *pool)
897
				   apr_pool_t *pool)
904
{
898
{
905
    swig_type_info *tinfo = SWIG_TypeQuery("svn_auth_baton_t *");
906
    SV *auth_baton;
899
    SV *auth_baton;
907
900
908
    *cb = apr_pcalloc (pool, sizeof(**cb));
901
    *cb = apr_pcalloc (pool, sizeof(**cb));
Lines 915-921 Link Here
915
    auth_baton = *hv_fetch((HV *)SvRV(perl_callbacks), "auth", 4, 0);
908
    auth_baton = *hv_fetch((HV *)SvRV(perl_callbacks), "auth", 4, 0);
916
909
917
    if (SWIG_ConvertPtr(auth_baton, 
910
    if (SWIG_ConvertPtr(auth_baton, 
918
                        (void **)&(*cb)->auth_baton, tinfo,0) < 0) {
911
                        (void **)&(*cb)->auth_baton, _SWIG_TYPE("svn_auth_baton_t *"),0) < 0) {
919
	croak("Unable to convert from SWIG Type");
912
	croak("Unable to convert from SWIG Type");
920
    }
913
    }
921
    *c_baton = perl_callbacks;
914
    *c_baton = perl_callbacks;
Lines 930-938 Link Here
930
                                             svn_boolean_t may_save,
923
                                             svn_boolean_t may_save,
931
                                             apr_pool_t *pool)
924
                                             apr_pool_t *pool)
932
{
925
{
933
    swig_type_info *poolinfo = SWIG_TypeQuery ("apr_pool_t *");
934
    swig_type_info *credinfo = SWIG_TypeQuery ("svn_auth_cred_simple_t *");
935
936
    /* Be nice and allocate the memory for the cred structure before passing it
926
    /* Be nice and allocate the memory for the cred structure before passing it
937
     * off to the perl space */
927
     * off to the perl space */
938
    *cred = apr_pcalloc (pool, sizeof (**cred));
928
    *cred = apr_pcalloc (pool, sizeof (**cred));
Lines 941-948 Link Here
941
    }
931
    }
942
    svn_swig_pl_callback_thunk (CALL_SV,
932
    svn_swig_pl_callback_thunk (CALL_SV,
943
                                baton, NULL,
933
                                baton, NULL,
944
                                "SssbS", *cred, credinfo,
934
                                "SssbS", *cred, _SWIG_TYPE ("svn_auth_cred_simple_t *"),
945
                                realm, username, may_save, pool, poolinfo);
935
                                realm, username, may_save, pool, POOLINFO);
946
936
947
    return SVN_NO_ERROR;
937
    return SVN_NO_ERROR;
948
}
938
}
Lines 953-961 Link Here
953
                                               svn_boolean_t may_save,
943
                                               svn_boolean_t may_save,
954
                                               apr_pool_t *pool)
944
                                               apr_pool_t *pool)
955
{
945
{
956
    swig_type_info *poolinfo = SWIG_TypeQuery ("apr_pool_t *");
957
    swig_type_info *credinfo = SWIG_TypeQuery ("svn_auth_cred_username_t *");
958
959
    /* Be nice and allocate the memory for the cred structure before passing it
946
    /* Be nice and allocate the memory for the cred structure before passing it
960
     * off to the perl space */
947
     * off to the perl space */
961
    *cred = apr_pcalloc (pool, sizeof (**cred));
948
    *cred = apr_pcalloc (pool, sizeof (**cred));
Lines 964-971 Link Here
964
    }
951
    }
965
    svn_swig_pl_callback_thunk (CALL_SV,
952
    svn_swig_pl_callback_thunk (CALL_SV,
966
                                baton, NULL,
953
                                baton, NULL,
967
                                "SsbS", *cred, credinfo,
954
                                "SsbS", *cred, _SWIG_TYPE("svn_auth_cred_username_t *"),
968
                                realm, may_save, pool, poolinfo);
955
                                realm, may_save, pool, POOLINFO);
969
956
970
    return SVN_NO_ERROR;
957
    return SVN_NO_ERROR;
971
}
958
}
Lines 979-990 Link Here
979
                              svn_boolean_t may_save,
966
                              svn_boolean_t may_save,
980
                              apr_pool_t *pool)
967
                              apr_pool_t *pool)
981
{
968
{
982
    swig_type_info *poolinfo = SWIG_TypeQuery ("apr_pool_t *");
983
    swig_type_info *credinfo = SWIG_TypeQuery (
984
                                 "svn_auth_cred_ssl_server_trust_t *");
985
    swig_type_info *cert_info_info = SWIG_TypeQuery (
986
                                 "svn_auth_ssl_server_cert_info_t *");
987
988
    /* Be nice and allocate the memory for the cred structure before passing it
969
    /* Be nice and allocate the memory for the cred structure before passing it
989
     * off to the perl space */
970
     * off to the perl space */
990
    *cred = apr_pcalloc (pool, sizeof (**cred));
971
    *cred = apr_pcalloc (pool, sizeof (**cred));
Lines 993-1002 Link Here
993
    }
974
    }
994
    svn_swig_pl_callback_thunk (CALL_SV,
975
    svn_swig_pl_callback_thunk (CALL_SV,
995
                                baton, NULL,
976
                                baton, NULL,
996
                                "SsiSbS", *cred, credinfo,
977
                                "SsiSbS", *cred, _SWIG_TYPE ("svn_auth_cred_ssl_server_trust_t *"),
997
                                realm, failures, 
978
                                realm, failures, 
998
                                cert_info, cert_info_info,
979
                                cert_info, _SWIG_TYPE ("svn_auth_ssl_server_cert_info_t *"),
999
                                may_save, pool, poolinfo);
980
                                may_save, pool, POOLINFO);
1000
981
1001
    /* Allow the perl callback to indicate failure by setting all vars to 0 
982
    /* Allow the perl callback to indicate failure by setting all vars to 0 
1002
     * or by simply doing nothing.  While still allowing them to indicate
983
     * or by simply doing nothing.  While still allowing them to indicate
Lines 1017-1026 Link Here
1017
                svn_boolean_t may_save,
998
                svn_boolean_t may_save,
1018
                apr_pool_t *pool)
999
                apr_pool_t *pool)
1019
{
1000
{
1020
    swig_type_info *poolinfo = SWIG_TypeQuery ("apr_pool_t *");
1021
    swig_type_info *credinfo = SWIG_TypeQuery (
1022
                                 "svn_auth_cred_ssl_client_cert_t *");
1023
    
1024
    /* Be nice and allocate the memory for the cred structure before passing it
1001
    /* Be nice and allocate the memory for the cred structure before passing it
1025
     * off to the perl space */
1002
     * off to the perl space */
1026
    *cred = apr_pcalloc (pool, sizeof (**cred));
1003
    *cred = apr_pcalloc (pool, sizeof (**cred));
Lines 1029-1036 Link Here
1029
    }
1006
    }
1030
    svn_swig_pl_callback_thunk (CALL_SV,
1007
    svn_swig_pl_callback_thunk (CALL_SV,
1031
                                baton, NULL,
1008
                                baton, NULL,
1032
                                "SsbS", *cred, credinfo,
1009
                                "SsbS", *cred, _SWIG_TYPE ("svn_auth_cred_ssl_client_cert_t *"),
1033
                                realm, may_save, pool, poolinfo);
1010
                                realm, may_save, pool, POOLINFO);
1034
1011
1035
    return SVN_NO_ERROR;
1012
    return SVN_NO_ERROR;
1036
}
1013
}
Lines 1042-1051 Link Here
1042
                                     svn_boolean_t may_save,
1019
                                     svn_boolean_t may_save,
1043
                                     apr_pool_t *pool)
1020
                                     apr_pool_t *pool)
1044
{
1021
{
1045
    swig_type_info *poolinfo = SWIG_TypeQuery ("apr_pool_t *");
1046
    swig_type_info *credinfo = SWIG_TypeQuery (
1047
                                 "svn_auth_cred_ssl_client_cert_pw_t *");
1048
1049
    /* Be nice and allocate the memory for the cred structure before passing it
1022
    /* Be nice and allocate the memory for the cred structure before passing it
1050
     * off to the perl space */
1023
     * off to the perl space */
1051
    *cred = apr_pcalloc (pool, sizeof (**cred));
1024
    *cred = apr_pcalloc (pool, sizeof (**cred));
Lines 1054-1061 Link Here
1054
    }
1027
    }
1055
    svn_swig_pl_callback_thunk (CALL_SV,
1028
    svn_swig_pl_callback_thunk (CALL_SV,
1056
                                baton, NULL,
1029
                                baton, NULL,
1057
                                "SsbS", *cred, credinfo,
1030
                                "SsbS", *cred, _SWIG_TYPE ("svn_auth_cred_ssl_client_cert_pw_t *"),
1058
                                realm, may_save, pool, poolinfo);
1031
                                realm, may_save, pool, POOLINFO);
1059
1032
1060
    return SVN_NO_ERROR;
1033
    return SVN_NO_ERROR;
1061
}
1034
}
Lines 1093-1101 Link Here
1093
    SV *log_msg_sv;
1066
    SV *log_msg_sv;
1094
    SV *tmp_file_sv;
1067
    SV *tmp_file_sv;
1095
    SV *commit_items_sv;
1068
    SV *commit_items_sv;
1096
    swig_type_info *commit_itemsinfo = SWIG_TypeQuery 
1097
	                                ("svn_client_commit_item_t *");
1098
    swig_type_info *poolinfo = SWIG_TypeQuery ("apr_pool_t *");
1099
1069
1100
    if (!SvOK((SV *)baton)) {
1070
    if (!SvOK((SV *)baton)) {
1101
        *log_msg = apr_pstrdup (pool, "");
1071
        *log_msg = apr_pstrdup (pool, "");
Lines 1105-1117 Link Here
1105
    
1075
    
1106
    log_msg_sv = newRV_noinc (sv_newmortal ());
1076
    log_msg_sv = newRV_noinc (sv_newmortal ());
1107
    tmp_file_sv = newRV_noinc (sv_newmortal ());
1077
    tmp_file_sv = newRV_noinc (sv_newmortal ());
1108
    commit_items_sv = svn_swig_pl_convert_array (commit_items, 
1078
    commit_items_sv = svn_swig_pl_convert_array
1109
			                         commit_itemsinfo);
1079
      (commit_items, _SWIG_TYPE("svn_client_commit_item_t *"));
1110
1080
1111
    svn_swig_pl_callback_thunk (CALL_SV,
1081
    svn_swig_pl_callback_thunk (CALL_SV,
1112
	                        baton, &result,
1082
	                        baton, &result,
1113
				"OOOS", log_msg_sv, tmp_file_sv,
1083
				"OOOS", log_msg_sv, tmp_file_sv,
1114
				commit_items_sv, pool, poolinfo);
1084
				commit_items_sv, pool, POOLINFO);
1115
1085
1116
    if (!SvOK(SvRV(log_msg_sv))) {
1086
    if (!SvOK(SvRV(log_msg_sv))) {
1117
        /* client returned undef to us */
1087
        /* client returned undef to us */
Lines 1134-1140 Link Here
1134
    }
1104
    }
1135
1105
1136
    if (sv_derived_from (result, "_p_svn_error_t")) {
1106
    if (sv_derived_from (result, "_p_svn_error_t")) {
1137
        swig_type_info *errorinfo = SWIG_TypeQuery("svn_error_t *");
1107
        swig_type_info *errorinfo = _SWIG_TYPE("svn_error_t *");
1138
	if (SWIG_ConvertPtr(result, (void *)&ret_val, errorinfo, 0) < 0) {
1108
	if (SWIG_ConvertPtr(result, (void *)&ret_val, errorinfo, 0) < 0) {
1139
            SvREFCNT_dec(result);
1109
            SvREFCNT_dec(result);
1140
	    croak("Unable to convert from SWIG Type");
1110
	    croak("Unable to convert from SWIG Type");
Lines 1156-1162 Link Here
1156
    svn_swig_pl_callback_thunk(CALL_SV, cancel_baton, &result, "");
1126
    svn_swig_pl_callback_thunk(CALL_SV, cancel_baton, &result, "");
1157
1127
1158
    if (sv_derived_from(result,"_p_svn_error_t")) { 
1128
    if (sv_derived_from(result,"_p_svn_error_t")) { 
1159
        swig_type_info *errorinfo = SWIG_TypeQuery("svn_error_t *");
1129
        swig_type_info *errorinfo = _SWIG_TYPE("svn_error_t *");
1160
	if (SWIG_ConvertPtr(result, (void *)&ret_val, errorinfo, 0) < 0) {
1130
	if (SWIG_ConvertPtr(result, (void *)&ret_val, errorinfo, 0) < 0) {
1161
	    SvREFCNT_dec(result);
1131
	    SvREFCNT_dec(result);
1162
	    croak("Unable to convert from SWIG Type");
1132
	    croak("Unable to convert from SWIG Type");
Lines 1179-1185 Link Here
1179
                             const char *path,
1149
                             const char *path,
1180
                             svn_wc_status_t *status)
1150
                             svn_wc_status_t *status)
1181
{
1151
{
1182
  swig_type_info *statusinfo = SWIG_TypeQuery ("svn_wc_status_t *");
1152
  swig_type_info *statusinfo = _SWIG_TYPE ("svn_wc_status_t *");
1183
1153
1184
  if (!SvOK ((SV *)baton)) {
1154
  if (!SvOK ((SV *)baton)) {
1185
    return;
1155
    return;
Lines 1201-1214 Link Here
1201
{
1171
{
1202
    SV *result;
1172
    SV *result;
1203
    svn_error_t *ret_val = SVN_NO_ERROR;
1173
    svn_error_t *ret_val = SVN_NO_ERROR;
1204
    swig_type_info *poolinfo = SWIG_TypeQuery("apr_pool_t *");
1205
 
1174
 
1206
    svn_swig_pl_callback_thunk (CALL_SV, baton, &result, "LrsssS",
1175
    svn_swig_pl_callback_thunk (CALL_SV, baton, &result, "LrsssS",
1207
		                line_no, revision, author, date, line,
1176
		                line_no, revision, author, date, line,
1208
				pool, poolinfo);
1177
				pool, POOLINFO);
1209
1178
1210
    if (sv_derived_from (result, "_p_svn_error_t")) {
1179
    if (sv_derived_from (result, "_p_svn_error_t")) {
1211
        swig_type_info *errorinfo = SWIG_TypeQuery("svn_error_t *");
1180
        swig_type_info *errorinfo = _SWIG_TYPE("svn_error_t *");
1212
	if (SWIG_ConvertPtr(result, (void *)&ret_val, errorinfo, 0) < 0) {
1181
	if (SWIG_ConvertPtr(result, (void *)&ret_val, errorinfo, 0) < 0) {
1213
            SvREFCNT_dec(result);
1182
            SvREFCNT_dec(result);
1214
	    croak("Unable to convert from SWIG Type");
1183
	    croak("Unable to convert from SWIG Type");
Lines 1251-1262 Link Here
1251
    apr_pool_t *pool;
1220
    apr_pool_t *pool;
1252
1221
1253
    if (obj && sv_isobject (obj)) {
1222
    if (obj && sv_isobject (obj)) {
1254
	swig_type_info *poolinfo = SWIG_TypeQuery("apr_pool_t *");
1255
	if (sv_derived_from (obj, "SVN::Pool")) {
1223
	if (sv_derived_from (obj, "SVN::Pool")) {
1256
	    obj = SvRV(obj);
1224
	    obj = SvRV(obj);
1257
	}
1225
	}
1258
	if (sv_derived_from(obj, "_p_apr_pool_t")) {
1226
	if (sv_derived_from(obj, "_p_apr_pool_t")) {
1259
	    SWIG_ConvertPtr(obj, (void **)&pool, poolinfo, 0);
1227
	    SWIG_ConvertPtr(obj, (void **)&pool, POOLINFO, 0);
1260
	    return pool;
1228
	    return pool;
1261
	}
1229
	}
1262
    }
1230
    }
Lines 1344-1350 Link Here
1344
1312
1345
svn_error_t *svn_swig_pl_make_stream (svn_stream_t **stream, SV *obj)
1313
svn_error_t *svn_swig_pl_make_stream (svn_stream_t **stream, SV *obj)
1346
{
1314
{
1347
    swig_type_info *tinfo = SWIG_TypeQuery("svn_stream_t *");
1348
    IO *io;
1315
    IO *io;
1349
    int simple_type = 1;
1316
    int simple_type = 1;
1350
1317
Lines 1361-1367 Link Here
1361
            simple_type = 0;
1328
            simple_type = 0;
1362
1329
1363
        if (simple_type) {
1330
        if (simple_type) {
1364
            SWIG_ConvertPtr(obj, (void **)stream, tinfo, 0);
1331
            SWIG_ConvertPtr(obj, (void **)stream, _SWIG_TYPE("svn_stream_t *"), 0);
1365
            return SVN_NO_ERROR;
1332
            return SVN_NO_ERROR;
1366
        }
1333
        }
1367
    }
1334
    }
Lines 1389-1399 Link Here
1389
1356
1390
SV *svn_swig_pl_from_stream (svn_stream_t *stream)
1357
SV *svn_swig_pl_from_stream (svn_stream_t *stream)
1391
{
1358
{
1392
    swig_type_info *tinfo = SWIG_TypeQuery("svn_stream_t *");
1393
    SV *ret;
1359
    SV *ret;
1394
1360
1395
    svn_swig_pl_callback_thunk (CALL_METHOD, (void *)"new", &ret, "sS",
1361
    svn_swig_pl_callback_thunk (CALL_METHOD, (void *)"new", &ret, "sS",
1396
			        "SVN::Stream", stream, tinfo);
1362
			        "SVN::Stream", stream, _SWIG_TYPE("svn_stream_t *"));
1397
1363
1398
    return sv_2mortal (ret);
1364
    return sv_2mortal (ret);
1399
}
1365
}

Return to bug 75294