* subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.c
[svn.git] / subversion / bindings / swig / include / svn_containers.swg
blob3ed5e4354601787fc94cdd5a054d2a7afbe356b2
1 /*
2  * ====================================================================
3  * Copyright (c) 2000-2008 CollabNet.  All rights reserved.
4  *
5  * This software is licensed as described in the file COPYING, which
6  * you should have received as part of this distribution.  The terms
7  * are also available at http://subversion.tigris.org/license-1.html.
8  * If newer versions of this license are posted there, you may use a
9  * newer version instead, at your option.
10  *
11  * This software consists of voluntary contributions made by many
12  * individuals.  For exact contribution history, see the revision
13  * history and logs, available at http://subversion.tigris.org/.
14  * ====================================================================
15  *
16  * svn_containers.swg: This is a child file of svn_types.swg, and
17  *   should not be included directly.  This file contains typemaps
18  *   that deal with "container" data types (e.g. apr_hash_t,
19  *   apr_array_header_t, etc.).
20  */
22 /* =======================================================================
23    %typemap(argout) apr_hash_t **
26 #ifdef SWIGPYTHON
27 %define %hash_argout_typemap(ParamName, ValueType)
28 %typemap(argout) apr_hash_t **ParamName {
29   %append_output(svn_swig_py_convert_hash(*$1,
30                                           $descriptor(ValueType),
31                                           _global_py_pool));
33 %enddef
34 #endif
35 #ifdef SWIGPERL
36 %define %hash_argout_typemap(ParamName, ValueType)
37 %typemap(argout) apr_hash_t **ParamName {
38   %append_output(svn_swig_pl_convert_hash(*$1, $descriptor(ValueType)));
40 %enddef
41 #endif
42 #ifdef SWIGRUBY
43 %define %hash_argout_typemap(ParamName, ValueType)
44 %typemap(argout) apr_hash_t **ParamName {
45   %append_output(svn_swig_rb_apr_hash_to_hash_swig_type(*$1,
46                                                         #ValueType));
48 %enddef
49 #endif
51 %hash_argout_typemap(dirents, svn_dirent_t *)
52 %hash_argout_typemap(locks, svn_lock_t *)
53 #ifdef SWIGPYTHON
54 /* FIXME: We are effectively treating this hash as an opaque blob...
55    this is because we currently do not have suitable typemaps to convert
56    it back to an apr_hash_t * for use. */
57 %typemap(argout) apr_hash_t **cfg_hash {
58   %append_output(svn_swig_NewPointerObj(*$1, $descriptor(apr_hash_t *),
59                                         _global_py_pool, args));
61 #else
62 %hash_argout_typemap(cfg_hash, svn_config_t *)
63 #endif
65 /* -----------------------------------------------------------------------
66    Output of apr_hash_t * <const char *, svn_string_t *>
67    (commonly used for property name and value pairs)
70 #ifdef SWIGPYTHON
71 %typemap(argout) apr_hash_t **HASH_SVN_STRING {
72   %append_output(svn_swig_py_prophash_to_dict(*$1));
74 %typemap(argout) apr_hash_t **HASH_SVN_STRING_MAYBENULL {
75   %append_output(!*$1 ? Py_None : svn_swig_py_prophash_to_dict(*$1));
77 #endif
78 #ifdef SWIGPERL
79 %typemap(argout) apr_hash_t **HASH_SVN_STRING {
80   %append_output(svn_swig_pl_prophash_to_hash(*$1));
82 %typemap(argout) apr_hash_t **HASH_SVN_STRING_MAYBENULL {
83   %append_output(!*$1 ? &PL_sv_undef : svn_swig_pl_prophash_to_hash(*$1));
85 #endif
86 #ifdef SWIGRUBY
87 %typemap(argout) apr_hash_t **HASH_SVN_STRING {
88   %append_output(svn_swig_rb_apr_hash_to_hash_svn_string(*$1));
90 %typemap(argout) apr_hash_t **HASH_SVN_STRING_MAYBENULL {
91   %append_output(!*$1 ? Qnil : svn_swig_rb_apr_hash_to_hash_svn_string(*$1));
93 #endif
94 %apply apr_hash_t **HASH_SVN_STRING {
95   apr_hash_t **props,
96   apr_hash_t **original_props,
97   apr_hash_t **table_p,
98   apr_hash_t **revprops
100 %apply apr_hash_t **HASH_SVN_STRING_MAYBENULL {
101   /* svn_config_read_auth_data() */
102   apr_hash_t **hash
106 /* -----------------------------------------------------------------------
107    Output of apr_hash_t * <const char *, const char *>
110 #ifdef SWIGRUBY
111 %typemap(argout) apr_hash_t **HASH_CSTRING {
112   %append_output(svn_swig_rb_apr_hash_to_hash_string(*$1));
114 #endif
115 #ifdef SWIGPYTHON
116 %typemap(argout) apr_hash_t **HASH_CSTRING {
117   %append_output(svn_swig_py_stringhash_to_dict(*$1));
119 #endif
121 %apply apr_hash_t **HASH_CSTRING {
122   apr_hash_t **type_map,
123   apr_hash_t **externals_old,
124   apr_hash_t **externals_new,
125   apr_hash_t **depts
128 /* -----------------------------------------------------------------------
129    apr_hash_t **locations
130    svn_repos_trace_node_locations()
131    svn_ra_get_locations()
134 #ifdef SWIGPYTHON
135 %typemap(argout) apr_hash_t **locations {
136   %append_output(svn_swig_py_locationhash_to_dict(*$1));
138 #endif
139 #ifdef SWIGRUBY
140 %typemap(argout) apr_hash_t **locations
142   %append_output(svn_swig_rb_apr_revnum_key_hash_to_hash_string(*$1));
144 #endif
146 /* -----------------------------------------------------------------------
147    apr_hash_t **externals_old
148    apr_hash_t **externals_new
149    svn_wc_edited_externals()
152 #ifdef SWIGRUBY
153 %typemap(argout) apr_hash_t **externals_old, apr_hash_t **externals_new {
154   %append_output(svn_swig_rb_apr_hash_to_hash_string(*$1));
156 #endif
159 /* =======================================================================
160    %typemap(in) apr_hash_t *
163 /* -----------------------------------------------------------------------
164    Input of apr_hash_t * <const char *, svn_string_t *>
165    (commonly used for property name and value pairs)
168 #ifdef SWIGPYTHON
169 %typemap(in) apr_hash_t *PROPHASH
170   (apr_pool_t *_global_pool = NULL, PyObject *_global_py_pool = NULL)
172   if (_global_pool == NULL)
173   {
174     if (svn_swig_py_get_parent_pool(args, $descriptor(apr_pool_t *),
175                                     &_global_py_pool, &_global_pool))
176       SWIG_fail;
177   }
179   $1 = svn_swig_py_prophash_from_dict($input, _global_pool);
180   if (PyErr_Occurred()) {
181     SWIG_fail;
182   }
185 %typemap(out) apr_hash_t *PROPHASH
187   %append_output(svn_swig_py_prophash_to_dict($1));
189 #endif
191 #ifdef SWIGPYTHON
192 %typemap(in) apr_hash_t *changed_paths
193   (apr_pool_t *_global_pool = NULL, PyObject *_global_py_pool = NULL)
195   if (_global_pool == NULL)
196   {
197     if (svn_swig_py_get_parent_pool(args, $descriptor(apr_pool_t *),
198                                     &_global_py_pool, &_global_pool))
199       SWIG_fail;
200   }
202   $1 = svn_swig_py_changed_path_hash_from_dict($input, _global_pool);
203   if (PyErr_Occurred()) {
204     SWIG_fail;
205   }
207 %typemap(out) apr_hash_t *changed_paths
209   %append_output(svn_swig_py_changed_path_hash_to_dict($1));
211 #endif
213 #ifdef SWIGRUBY
214 %typemap(in) apr_hash_t *PROPHASH
216   VALUE rb_pool = Qnil;
217   if (!_global_pool) {
218     svn_swig_rb_get_pool(argc, argv, self, &rb_pool, &_global_pool);
219     svn_swig_rb_push_pool(rb_pool);
220   }
221   $1 = svn_swig_rb_hash_to_apr_hash_svn_string($input, _global_pool);
222   _global_pool = NULL;
223   if (!NIL_P(rb_pool)) {
224     if (NIL_P($1)) {
225       svn_swig_rb_destroy_pool(rb_pool);
226     } else {
227       svn_swig_rb_set_pool_for_no_swig_type($input, rb_pool);
228     }
229     svn_swig_rb_pop_pool(_global_svn_swig_rb_pool);
230   }
232 #endif
234 #if defined(SWIGPYTHON) || defined(SWIGRUBY)
235 %apply apr_hash_t *PROPHASH {
236   apr_hash_t *target_props,
237   apr_hash_t *source_props,
238   apr_hash_t *hash,
239   apr_hash_t *props,
240   apr_hash_t *revprop_table,
241   apr_hash_t *revprops
243 #endif
245 /* -----------------------------------------------------------------------
246    Input of scripting hash/dictionary (string => string)
247    converted to apr_hash_t (const char * => const char *)
249 #ifdef SWIGPYTHON
250 %typemap(in) apr_hash_t *HASH_CSTRING {
251   $1 = svn_swig_py_stringhash_from_dict($input, _global_pool);
253 %typemap(in) apr_hash_t *HASH_CSTRING_MAYBENULL {
254   /* PYTHON-FIXME: Handle None -> NULL. */
255   $1 = svn_swig_py_stringhash_from_dict($input, _global_pool);
257 #endif
258 #ifdef SWIGPERL
259 %typemap(in) apr_hash_t *HASH_CSTRING {
260   $1 = svn_swig_pl_strings_to_hash($input, _global_pool);
262 %typemap(in) apr_hash_t *HASH_CSTRING_MAYBENULL {
263   /* PERL-FIXME: Handle undef -> NULL. */
264   $1 = svn_swig_pl_strings_to_hash($input, _global_pool);
266 #endif
267 #ifdef SWIGRUBY
268 %typemap(in) apr_hash_t *HASH_CSTRING {
269   $1 = svn_swig_rb_hash_to_apr_hash_string($input, _global_pool);
271 %typemap(in) apr_hash_t *HASH_CSTRING_MAYBENULL {
272   VALUE rb_pool = Qnil;
273   if (!_global_pool) {
274     svn_swig_rb_get_pool(argc, argv, self, &rb_pool, &_global_pool);
275     svn_swig_rb_push_pool(rb_pool);
276   }
277   $1 = (NIL_P($input)) ? NULL :
278     svn_swig_rb_hash_to_apr_hash_string($input, _global_pool);
279   _global_pool = NULL;
280   if (!NIL_P(rb_pool)) {
281     if (NIL_P($1)) {
282       svn_swig_rb_destroy_pool(rb_pool);
283     } else {
284       svn_swig_rb_set_pool_for_no_swig_type($input, rb_pool);
285     }
286     svn_swig_rb_pop_pool(_global_svn_swig_rb_pool);
287   }
290 %typemap(out) apr_hash_t *HASH_CSTRING_MAYBENULL {
291   $result = $1 ? svn_swig_rb_apr_hash_to_hash_string($1) : Qnil;
293 #endif
295 %apply apr_hash_t *HASH_CSTRING {
296   apr_hash_t *path_tokens
298 %apply apr_hash_t *HASH_CSTRING_MAYBENULL {
299   apr_hash_t *fs_config,
300   apr_hash_t *lock_tokens
303 /* -----------------------------------------------------------------------
304    handle config and fs_config in svn_{fs,repos}_create
307 #ifdef SWIGPERL
308 %typemap(in) apr_hash_t *config {
309     $1 = svn_swig_pl_objs_to_hash_by_name ($input, "svn_config_t *",
310                                            _global_pool);
312 #endif
313 #ifdef SWIGRUBY
314 %typemap(in) apr_hash_t *config
316   if (NIL_P($input)) {
317     $1 = NULL;
318   } else {
319     $1 = svn_swig_rb_hash_to_apr_hash_swig_type($input, "svn_config_t *", _global_pool);
320   }
322 #endif
324 #ifdef SWIGRUBY
325 %typemap(in) apr_hash_t *path_revs
327   $1 = svn_swig_rb_hash_to_apr_hash_revnum($input, _global_pool);
329 #endif
331 #ifdef SWIGPYTHON
332 %typemap(in) apr_hash_t *path_revs
334   $1 = svn_swig_py_path_revs_hash_from_dict($input, _global_pool);
336 #endif
338 /* =======================================================================
339    %typemap(argout) apr_array_header_t **
342 /* -----------------------------------------------------------------------
343    Output of apr_array_header_t * <svn_prop_t *>
345 #ifdef SWIGRUBY
346 %typemap(argout) apr_array_header_t **OUTPUT_OF_PROP {
347   %append_output(svn_swig_rb_prop_apr_array_to_hash_prop(*$1));
350 %apply apr_array_header_t **OUTPUT_OF_PROP {
351   apr_array_header_t **entry_props,
352   apr_array_header_t **wc_props,
353   apr_array_header_t **regular_props,
354   apr_array_header_t **propdiffs
356 #endif
358 #ifdef SWIGPYTHON
359 %typemap(argout) apr_array_header_t **OUTPUT_OF_PROP {
360   %append_output(svn_swig_py_proparray_to_dict(*$1));
363 %apply apr_array_header_t **OUTPUT_OF_PROP {
364   apr_array_header_t **entry_props,
365   apr_array_header_t **wc_props,
366   apr_array_header_t **regular_props,
367   apr_array_header_t **propdiffs
369 #endif
371 /* -----------------------------------------------------------------------
372    Output of apr_array_header_t * <const char *>
375 #ifdef SWIGPYTHON
376 %typemap(argout) apr_array_header_t **OUTPUT_OF_CONST_CHAR_P {
377   %append_output(svn_swig_py_array_to_list(*$1));
379 #endif
380 #ifdef SWIGPERL
381 %typemap(argout) apr_array_header_t **OUTPUT_OF_CONST_CHAR_P {
382   %append_output(svn_swig_pl_array_to_list(*$1));
384 #endif
385 #ifdef SWIGRUBY
386 %typemap(argout) apr_array_header_t **OUTPUT_OF_CONST_CHAR_P {
387   %append_output(svn_swig_rb_apr_array_to_array_string(*$1));
389 #endif
391 %apply apr_array_header_t **OUTPUT_OF_CONST_CHAR_P {
392   apr_array_header_t **patterns,
393   apr_array_header_t **logfiles,
394   apr_array_header_t **names_p,
395   apr_array_header_t **targets_p,
396   apr_array_header_t **args_p
399 /* -----------------------------------------------------------------------
400    apr_array_header_t **externals_p
401    svn_wc_parse_externals_description3()
404 #ifdef SWIGRUBY
405 %typemap(argout) apr_array_header_t **externals_p {
406   %append_output(svn_swig_rb_apr_array_to_array_external_item2(*$1));
408 #endif
410 /* svn_client_update3/svn_client_update2 */
411 #ifdef SWIGPYTHON
412 %typemap(argout) apr_array_header_t **result_revs {
413   %append_output(svn_swig_py_revarray_to_list(*$1));
414   if (PyErr_Occurred()) {
415     SWIG_fail;
416   }
418 #endif
420 #ifdef SWIGRUBY
421 %typemap(argout) apr_array_header_t **result_revs {
422   %append_output(svn_swig_rb_apr_array_to_array_svn_rev(*$1));
424 #endif
426 /* =======================================================================
427    %typemap(in) apr_array_header_t *
430 /* -----------------------------------------------------------------------
431    apr_array_header_t *location_revisions
432    svn_repos_trace_node_locations()
433    svn_ra_get_locations()
436 #ifdef SWIGPYTHON
437 %typemap(in) apr_array_header_t *location_revisions {
438     $1 = (apr_array_header_t *) svn_swig_py_revnums_to_array($input,
439                                                              _global_pool);
440     if ($1 == NULL)
441         SWIG_fail;
443 #endif
444 #ifdef SWIGRUBY
445 %typemap(in) apr_array_header_t *location_revisions {
446   $1 = svn_swig_rb_array_to_apr_array_revnum($input, _global_pool);
448 #endif
450 /* -----------------------------------------------------------------------
451    define a general INPUT param of an array of const char * items.
452  */
454 #ifdef SWIGPYTHON
455 %typemap(in) const apr_array_header_t *STRINGLIST {
456     $1 = (apr_array_header_t *) svn_swig_py_strings_to_array($input,
457                                                              _global_pool);
458     if (PyErr_Occurred())
459       SWIG_fail;
461 %typemap(in) const apr_array_header_t *STRINGLIST_MAY_BE_NULL {
462     $1 = ($input == Py_None) 
463            ? NULL
464            : (apr_array_header_t *)svn_swig_py_strings_to_array($input,
465                                                                 _global_pool);
466     if (PyErr_Occurred())
467       SWIG_fail;
469 #endif
470 #ifdef SWIGPERL
471 %typemap(in) const apr_array_header_t *STRINGLIST {
472     $1 = (apr_array_header_t *) svn_swig_pl_strings_to_array($input,
473                                                              _global_pool);
475 #endif
476 #ifdef SWIGRUBY
477 %typemap(in) const apr_array_header_t *STRINGLIST {
478   $1 = svn_swig_rb_strings_to_apr_array($input, _global_pool);
480 %typemap(in) const apr_array_header_t *STRINGLIST_MAY_BE_NULL {
481   $1 = (NIL_P($input)) ? NULL :
482     svn_swig_rb_strings_to_apr_array($input, _global_pool);
484 #endif
486 /* svn_delta_path_driver() mutates its 'paths' argument (by sorting it),
487    despite the fact that it is notionally an input parameter - hence, the
488    lack of 'const' in that one case.
490    svn_wc_get_update_editor3() and svn_wc_get_switch_editor3() aren't changing
491    their 'preserved_exts' argument, but it is forwarded to
492    svn_cstring_match_glob_list which also doesn't modify it, but does not have
493    const in its prototype.  */
494 %apply const apr_array_header_t *STRINGLIST {
495   const apr_array_header_t *args,
496   const apr_array_header_t *diff_options,
497   apr_array_header_t *paths,
498   apr_array_header_t *revprops,
499   const apr_array_header_t *targets,
500   apr_array_header_t *preserved_exts
503 /* -----------------------------------------------------------------------
504    auth provider convertors
506 #ifdef SWIGPERL
507 %typemap(in) apr_array_header_t *providers {
508     $1 = (apr_array_header_t *) svn_swig_pl_objs_to_array($input,
509       $descriptor(svn_auth_provider_object_t *), _global_pool);
511 #endif
513 #ifdef SWIGPYTHON
514 %typemap(in) apr_array_header_t *providers {
515     svn_auth_provider_object_t *provider;
516     int targlen;
517     if (!PySequence_Check($input)) {
518         PyErr_SetString(PyExc_TypeError, "not a sequence");
519         SWIG_fail;
520     }
521     targlen = PySequence_Length($input);
522     $1 = apr_array_make(_global_pool, targlen, sizeof(provider));
523     ($1)->nelts = targlen;
524     while (targlen--) {
525         provider = svn_swig_MustGetPtr(PySequence_GetItem($input, targlen),
526           $descriptor(svn_auth_provider_object_t *), $svn_argnum);
527         if (PyErr_Occurred()) {
528           SWIG_fail;
529         }
530         APR_ARRAY_IDX($1, targlen, svn_auth_provider_object_t *) = provider;
531     }
533 #endif
535 #ifdef SWIGRUBY
536 %typemap(in) apr_array_header_t *providers
538   $1 = svn_swig_rb_array_to_auth_provider_object_apr_array($input, _global_pool);
540 #endif
542 /* -----------------------------------------------------------------------
543    An array of svn_prop_t.
546 #ifdef SWIGRUBY
547 %typemap(in) apr_array_header_t *ROW_PROP_LIST
549   $1 = svn_swig_rb_to_apr_array_row_prop($input, _global_pool);
552 %apply apr_array_header_t *ROW_PROP_LIST {
553   apr_array_header_t *proplist
555 #endif
557 /* -----------------------------------------------------------------------
558    An array of svn_prop_t *.
561 #ifdef SWIGRUBY
562 %typemap(in) apr_array_header_t *PROP_LIST
564   VALUE rb_pool;
565   apr_pool_t *pool;
567   svn_swig_rb_get_pool(argc, argv, self, &rb_pool, &pool);
569   $1 = svn_swig_rb_to_apr_array_prop($input, pool);
572 %typemap(out) apr_array_header_t *PROP_LIST
574   %append_output(svn_swig_rb_prop_apr_array_to_hash_prop($1));
577 %typemap(in) apr_array_header_t *PROP_LIST_MAY_BE_NULL
579   if (NIL_P($input)) {
580     $1 = NULL;
581   } else {
582     VALUE rb_pool;
583     apr_pool_t *pool;
585     svn_swig_rb_get_pool(argc, argv, self, &rb_pool, &pool);
586     $1 = svn_swig_rb_to_apr_array_prop($input, pool);
587   }
590 %typemap(out) apr_array_header_t *PROP_LIST_MAY_BE_NULL
592   %append_output($1 ? svn_swig_rb_prop_apr_array_to_hash_prop($1) : Qnil);
595 %apply apr_array_header_t *PROP_LIST {
596   apr_array_header_t *wcprop_changes,
597   apr_array_header_t *propchanges
600 %apply apr_array_header_t *PROP_LIST_MAY_BE_NULL {
601   apr_array_header_t *incoming_prop_changes,
602   apr_array_header_t *outgoing_prop_changes,
603   apr_array_header_t *merge_options
606 #endif
608 /* -----------------------------------------------------------------------
609    Input of apr_array_header_t * <svn_merge_range_t *>
611 #ifdef SWIGPYTHON
612 %typemap(in) apr_array_header_t *RANGELIST {
613   $1 = svn_swig_py_rangelist_to_array($input, _global_pool);
614   if (PyErr_Occurred()) {
615     SWIG_fail;
616   }
618 #endif
620 #ifdef SWIGRUBY
621 %typemap(in) apr_array_header_t *RANGELIST {
622   $1 = svn_swig_rb_array_to_apr_array_merge_range($input, _global_pool);
624 #endif
626 /* -----------------------------------------------------------------------
627    Input of apr_array_header_t * <svn_client_copy_source_t *>
629 #ifdef SWIGRUBY
630 %typemap(in) apr_array_header_t *SOURCES {
631   $1 = svn_swig_rb_array_to_apr_array_copy_source($input, _global_pool);
633 #endif
635 /* -----------------------------------------------------------------------
636    Input of apr_array_header_t * <svn_opt_revision_range_t *>
638 #ifdef SWIGRUBY
639 %typemap(in) apr_array_header_t *REVISION_RANGE_LIST {
640   $1 = svn_swig_rb_array_to_apr_array_revision_range($input, _global_pool);
642 #endif
644 /* -----------------------------------------------------------------------
645    Input of
646    apr_hash_t * <const char *, apr_array_header_t * <svn_merge_range_t *>>
648 #ifdef SWIGPYTHON
649 %typemap(in) apr_hash_t *MERGEINFO {
650   $1 = svn_swig_py_mergeinfo_from_dict($input, _global_pool);
651   if (PyErr_Occurred()) {
652     SWIG_fail;
653   }
655 #endif
657 #ifdef SWIGRUBY
658 %typemap(in) apr_hash_t *MERGEINFO {
659   $1 = svn_swig_rb_hash_to_apr_hash_merge_range($input, _global_pool);
661 #endif
663 /* -----------------------------------------------------------------------
664    Output of
665    apr_hash_t * <const char *, apr_array_header_t * <svn_merge_range_t *>>
667 #ifdef SWIGPYTHON
668 %typemap(argout) apr_hash_t **MERGEINFO
670   %append_output
671     (svn_swig_py_mergeinfo_to_dict(*$1, $descriptor(svn_merge_range_t *),
672                                     _global_py_pool));
674   if (PyErr_Occurred()) {
675     SWIG_fail;
676   }
679 %typemap(in) apr_hash_t **MERGEINFO_INOUT ($*1_ltype temp)
681   $1 = &temp;
682   *$1 = svn_swig_py_mergeinfo_from_dict($input, _global_pool);
683   if (PyErr_Occurred()) {
684     SWIG_fail;
685   }
687 #endif
689 #ifdef SWIGRUBY
690 %typemap(argout) apr_hash_t **MERGEINFO
692   %append_output(svn_swig_rb_apr_hash_to_hash_merge_range(*$1));
695 %typemap(in) apr_hash_t **MERGEINFO_INOUT ($*1_ltype temp)
697   $1 = &temp;
698   *$1 = svn_swig_rb_hash_to_apr_hash_merge_range($input, _global_pool);
700 #endif
702 #if defined(SWIGPYTHON) || defined(SWIGRUBY)
703 %typemap(argout) apr_hash_t **MERGEINFO_INOUT = apr_hash_t **MERGEINFO;
704 #endif
706 /* -----------------------------------------------------------------------
707    Output of
708    apr_hash_t * <const char *,
709                  apr_hash_t * <const char *,
710                                array_header_t * <svn_merge_range_t *>>>
712 #ifdef SWIGRUBY
713 %typemap(argout) apr_hash_t **MERGEINFO_CATALOG
715   %append_output(svn_swig_rb_apr_hash_to_hash_merge_range_hash(*$1));
717 #endif
718 #ifdef SWIGPYTHON
719 %typemap(argout) apr_hash_t **MERGEINFO_CATALOG
721   %append_output(svn_swig_py_mergeinfo_catalog_to_dict(*$1,
722                                             $descriptor(svn_merge_range_t *),
723                                             _global_py_pool));
724   if (PyErr_Occurred()) {
725     SWIG_fail;
726   }
728 #endif
730 /* -----------------------------------------------------------------------
731    Output of apr_array_header_t * <svn_merge_range_t *>
733 #ifdef SWIGPYTHON
734 %typemap(argout) apr_array_header_t **RANGELIST {
735   %append_output
736     (svn_swig_py_rangelist_to_list(*$1, $descriptor(svn_merge_range_t *),
737                                    _global_py_pool));
738   if (PyErr_Occurred()) {
739     SWIG_fail;
740   }
743 %typemap(in) apr_array_header_t **RANGELIST_INOUT ($*1_ltype temp)
745   $1 = &temp;
746   *$1 = svn_swig_py_rangelist_to_array($input, _global_pool);
747   if (PyErr_Occurred()) {
748     SWIG_fail;
749   }
751 #endif
753 #ifdef SWIGRUBY
754 %typemap(argout) apr_array_header_t **RANGELIST {
755   %append_output(svn_swig_rb_apr_array_to_array_merge_range(*$1));
758 %typemap(in) apr_array_header_t **RANGELIST_INOUT ($*1_ltype temp)
760   $1 = &temp;
761   *$1 = svn_swig_rb_array_to_apr_array_merge_range($input, _global_pool);
763 #endif
765 #if defined(SWIGPYTHON) || defined(SWIGRUBY)
766 %typemap(argout) apr_array_header_t **RANGELIST_INOUT =
767    apr_array_header_t **RANGELIST;
768 #endif