~svn/ubuntu/raring/subversion/ppa

« back to all changes in this revision

Viewing changes to subversion/bindings/swig/svn_delta.i

  • Committer: Bazaar Package Importer
  • Author(s): Adam Conrad
  • Date: 2005-12-05 01:26:14 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20051205012614-qom4xfypgtsqc2xq
Tags: 1.2.3dfsg1-3ubuntu1
Merge with the final Debian release of 1.2.3dfsg1-3, bringing in
fixes to the clean target, better documentation of the libdb4.3
upgrade and build fixes to work with swig1.3_1.3.27.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * svn_delta.i :  SWIG interface file for svn_delta.h
 
3
 *
 
4
 * ====================================================================
 
5
 * Copyright (c) 2000-2003 CollabNet.  All rights reserved.
 
6
 *
 
7
 * This software is licensed as described in the file COPYING, which
 
8
 * you should have received as part of this distribution.  The terms
 
9
 * are also available at http://subversion.tigris.org/license-1.html.
 
10
 * If newer versions of this license are posted there, you may use a
 
11
 * newer version instead, at your option.
 
12
 *
 
13
 * This software consists of voluntary contributions made by many
 
14
 * individuals.  For exact contribution history, see the revision
 
15
 * history and logs, available at http://subversion.tigris.org/.
 
16
 * ====================================================================
 
17
 */
 
18
 
 
19
#if defined(SWIGPERL)
 
20
%module "SVN::_Delta"
 
21
#elif defined(SWIGRUBY)
 
22
%module "svn::ext::delta"
 
23
#else
 
24
%module delta
 
25
#endif
 
26
 
 
27
%include "typemaps.i"
 
28
 
 
29
%import apr.i
 
30
%import svn_types.i
 
31
%import svn_string.i
 
32
 
 
33
/* -----------------------------------------------------------------------
 
34
   For these types, "type **" is always an OUT param.
 
35
*/
 
36
%apply SWIGTYPE **OUTPARAM {
 
37
    svn_txdelta_stream_t **,
 
38
    void **,
 
39
    svn_txdelta_window_t **,
 
40
    const svn_delta_editor_t **,
 
41
    svn_txdelta_window_handler_t *
 
42
};
 
43
 
 
44
/* -----------------------------------------------------------------------
 
45
   mark window.new_data as readonly since we would need a pool to set it
 
46
   properly (e.g. to allocate an svn_string_t structure).
 
47
*/
 
48
%immutable svn_txdelta_window_t::new_data;
 
49
 
 
50
/* -----------------------------------------------------------------------
 
51
   thunk editors for the various language bindings.
 
52
*/
 
53
 
 
54
#ifdef SWIGPYTHON
 
55
void svn_swig_py_make_editor(const svn_delta_editor_t **editor,
 
56
                             void **edit_baton,
 
57
                             PyObject *py_editor,
 
58
                             apr_pool_t *pool);
 
59
#endif
 
60
 
 
61
%typemap(perl5, in) (const svn_delta_editor_t *editor, void *edit_baton) {
 
62
    svn_delta_make_editor(&$1, &$2, $input, _global_pool);
 
63
}
 
64
 
 
65
#ifdef SWIGRUBY
 
66
void svn_swig_rb_make_editor(const svn_delta_editor_t **editor,
 
67
                             void **edit_baton,
 
68
                             VALUE rb_editor,
 
69
                             apr_pool_t *pool);
 
70
#endif
 
71
 
 
72
/* ----------------------------------------------------------------------- */
 
73
 
 
74
%{
 
75
#include "svn_md5.h"
 
76
#include "svn_delta.h"
 
77
 
 
78
#ifdef SWIGPYTHON
 
79
#include "swigutil_py.h"
 
80
#endif
 
81
 
 
82
#ifdef SWIGPERL
 
83
#include "swigutil_pl.h"
 
84
#endif
 
85
 
 
86
#ifdef SWIGRUBY
 
87
#include "swigutil_rb.h"
 
88
#endif
 
89
%}
 
90
 
 
91
%include svn_delta.h
 
92
 
 
93
/* -----------------------------------------------------------------------
 
94
   editor callback invokers
 
95
*/
 
96
 
 
97
/* Cancel the typemap as they aren't returned valued in member functions
 
98
   if editor. */
 
99
%typemap(perl5, in) (const svn_delta_editor_t *editor, void *edit_baton);
 
100
 
 
101
#ifdef SWIGPERL
 
102
%include delta_editor.hi
 
103
#endif
 
104
 
 
105
#ifdef SWIGRUBY
 
106
REMOVE_DESTRUCTOR(svn_txdelta_op_t)
 
107
REMOVE_DESTRUCTOR(svn_txdelta_window_t)
 
108
REMOVE_DESTRUCTOR(svn_delta_editor_t)
 
109
#endif