~ubuntu-branches/ubuntu/precise/subversion/precise-security

« back to all changes in this revision

Viewing changes to subversion/bindings/swig/proxy/perlrun.swg

  • Committer: Bazaar Package Importer
  • Author(s): Steve Langasek
  • Date: 2009-06-06 22:57:04 UTC
  • mfrom: (1.2.1 upstream)
  • mto: (1.3.4 merge)
  • mto: This revision was merged to the branch mainline in revision 32.
  • Revision ID: james.westby@ubuntu.com-20090606225704-aivy7dhglo1zd120
Tags: upstream-1.5.6dfsg
ImportĀ upstreamĀ versionĀ 1.5.6dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
79
79
 
80
80
/* SWIG Perl macros */
81
81
 
 
82
/* Macro to declare an XS function */
 
83
#ifndef XSPROTO
 
84
#   define XSPROTO(name) void name(pTHX_ CV* cv)
 
85
#endif
 
86
 
82
87
/* Macro to call an XS function */
83
88
#ifdef PERL_OBJECT 
84
89
#  define SWIG_CALLXS(_name) _name(cv,pPerl) 
90
95
#  endif 
91
96
#endif 
92
97
 
93
 
/* Note: SwigMagicFuncHack is a typedef used to get the C++ compiler to just shut up already */
94
 
 
95
98
#ifdef PERL_OBJECT
96
99
#define MAGIC_PPERL  CPerlObj *pPerl = (CPerlObj *) this;
 
100
 
 
101
#ifdef __cplusplus
 
102
extern "C" {
 
103
#endif
97
104
typedef int (CPerlObj::*SwigMagicFunc)(SV *, MAGIC *);
98
 
 
99
 
#ifdef __cplusplus
100
 
extern "C" {
101
 
#endif
102
 
typedef int (CPerlObj::*SwigMagicFuncHack)(SV *, MAGIC *);
103
105
#ifdef __cplusplus
104
106
}
105
107
#endif
106
108
 
107
109
#define SWIG_MAGIC(a,b) (SV *a, MAGIC *b)
108
110
#define SWIGCLASS_STATIC
109
 
#else
 
111
 
 
112
#else /* PERL_OBJECT */
 
113
 
110
114
#define MAGIC_PPERL
111
115
#define SWIGCLASS_STATIC static SWIGUNUSED
 
116
 
112
117
#ifndef MULTIPLICITY
113
118
#define SWIG_MAGIC(a,b) (SV *a, MAGIC *b)
 
119
 
 
120
#ifdef __cplusplus
 
121
extern "C" {
 
122
#endif
114
123
typedef int (*SwigMagicFunc)(SV *, MAGIC *);
115
 
 
116
 
#ifdef __cplusplus
117
 
extern "C" {
118
 
#endif
119
 
typedef int (*SwigMagicFuncHack)(SV *, MAGIC *);
120
124
#ifdef __cplusplus
121
125
}
122
126
#endif
123
127
 
 
128
#else /* MULTIPLICITY */
124
129
 
125
 
#else
126
130
#define SWIG_MAGIC(a,b) (struct interpreter *interp, SV *a, MAGIC *b)
 
131
 
 
132
#ifdef __cplusplus
 
133
extern "C" {
 
134
#endif
127
135
typedef int (*SwigMagicFunc)(struct interpreter *, SV *, MAGIC *);
128
136
#ifdef __cplusplus
129
 
extern "C" {
130
 
#endif
131
 
typedef int (*SwigMagicFuncHack)(struct interpreter *, SV *, MAGIC *);
132
 
#ifdef __cplusplus
133
137
}
134
138
#endif
135
139
 
136
 
#endif
137
 
#endif
 
140
#endif /* MULTIPLICITY */
 
141
#endif /* PERL_OBJECT */
138
142
 
139
143
/* Workaround for bug in perl 5.6.x croak and earlier */
140
144
#if (PERL_VERSION < 8)
351
355
  const char  *c = 0;
352
356
 
353
357
  if ((!obj) || (!SvOK(obj))) return SWIG_ERROR;
354
 
  c = SvPV(obj, PL_na);
 
358
  c = SvPV_nolen(obj);
355
359
  /* Pointer values must start with leading underscore */
356
360
  if (*c != '_') return SWIG_ERROR;
357
361
  c++;
368
372
#define SWIG_croak(x)    { SWIG_Error(SWIG_RuntimeError, x); SWIG_fail; }
369
373
 
370
374
 
371
 
typedef XS(SwigPerlWrapper);
 
375
typedef XSPROTO(SwigPerlWrapper);
372
376
typedef SwigPerlWrapper *SwigPerlWrapperPtr;
373
377
 
374
378
/* Structure for command table */
421
425
  sv_magic(sv,sv,'U',(char *) name,strlen(name));
422
426
  mg = mg_find(sv,'U');
423
427
  mg->mg_virtual = (MGVTBL *) malloc(sizeof(MGVTBL));
424
 
  mg->mg_virtual->svt_get = (SwigMagicFuncHack) get;
425
 
  mg->mg_virtual->svt_set = (SwigMagicFuncHack) set;
 
428
  mg->mg_virtual->svt_get = (SwigMagicFunc) get;
 
429
  mg->mg_virtual->svt_set = (SwigMagicFunc) set;
426
430
  mg->mg_virtual->svt_len = 0;
427
431
  mg->mg_virtual->svt_clear = 0;
428
432
  mg->mg_virtual->svt_free = 0;