~ubuntu-branches/debian/sid/subversion/sid

« back to all changes in this revision

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

  • Committer: Package Import Robot
  • Author(s): James McCoy
  • Date: 2015-08-07 21:32:47 UTC
  • mfrom: (0.2.15) (4.1.7 experimental)
  • Revision ID: package-import@ubuntu.com-20150807213247-ozyewtmgsr6tkewl
Tags: 1.9.0-1
* Upload to unstable
* New upstream release.
  + Security fixes
    - CVE-2015-3184: Mixed anonymous/authenticated path-based authz with
      httpd 2.4
    - CVE-2015-3187: svn_repos_trace_node_locations() reveals paths hidden
      by authz
* Add >= 2.7 requirement for python-all-dev Build-Depends, needed to run
  tests.
* Remove Build-Conflicts against ruby-test-unit.  (Closes: #791844)
* Remove patches/apache_module_dependency in favor of expressing the
  dependencies in authz_svn.load/dav_svn.load.
* Build-Depend on apache2-dev (>= 2.4.16) to ensure ap_some_authn_required()
  is available when building mod_authz_svn and Depend on apache2-bin (>=
  2.4.16) for runtime support.

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
  You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for
23
23
  creating a static or dynamic library from the SWIG runtime code.
24
24
  In 99.9% of the cases, SWIG just needs to declare them as 'static'.
25
 
  
 
25
 
26
26
  But only do this if strictly necessary, ie, if you have problems
27
27
  with your compiler or suchlike.
28
28
*/
48
48
#define SWIG_POINTER_OWN           0x1
49
49
 
50
50
 
51
 
/* 
 
51
/*
52
52
   Flags/methods for returning states.
53
 
   
54
 
   The SWIG conversion methods, as ConvertPtr, return an integer 
 
53
 
 
54
   The SWIG conversion methods, as ConvertPtr, return an integer
55
55
   that tells if the conversion was successful or not. And if not,
56
56
   an error code can be returned (see swigerrors.swg for the codes).
57
 
   
 
57
 
58
58
   Use the following macros/flags to set or process the returning
59
59
   states.
60
 
   
 
60
 
61
61
   In old versions of SWIG, code such as the following was usually written:
62
62
 
63
63
     if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) {
90
90
    } else {
91
91
      // fail code
92
92
    }
93
 
    
 
93
 
94
94
   I.e., now SWIG_ConvertPtr can return new objects and you can
95
95
   identify the case and take care of the deallocation. Of course that
96
96
   also requires SWIG_ConvertPtr to return new result values, such as
97
97
 
98
 
      int SWIG_ConvertPtr(obj, ptr,...) {         
99
 
        if (<obj is ok>) {                             
100
 
          if (<need new object>) {                     
101
 
            *ptr = <ptr to new allocated object>; 
102
 
            return SWIG_NEWOBJ;                
103
 
          } else {                                     
104
 
            *ptr = <ptr to old object>;        
105
 
            return SWIG_OLDOBJ;                
106
 
          }                                    
107
 
        } else {                                       
108
 
          return SWIG_BADOBJ;                  
109
 
        }                                              
 
98
      int SWIG_ConvertPtr(obj, ptr,...) {
 
99
        if (<obj is ok>) {
 
100
          if (<need new object>) {
 
101
            *ptr = <ptr to new allocated object>;
 
102
            return SWIG_NEWOBJ;
 
103
          } else {
 
104
            *ptr = <ptr to old object>;
 
105
            return SWIG_OLDOBJ;
 
106
          }
 
107
        } else {
 
108
          return SWIG_BADOBJ;
 
109
        }
110
110
      }
111
111
 
112
112
   Of course, returning the plain '0(success)/-1(fail)' still works, but you can be
120
120
       int fooi(int);
121
121
 
122
122
   and you call
123
 
 
 
123
 
124
124
      food(1)   // cast rank '1'  (1 -> 1.0)
125
125
      fooi(1)   // cast rank '0'
126
126
 
127
127
   just use the SWIG_AddCast()/SWIG_CheckState()
128
128
*/
129
129
 
130
 
#define SWIG_OK                    (0) 
 
130
#define SWIG_OK                    (0)
131
131
#define SWIG_ERROR                 (-1)
132
132
#define SWIG_IsOK(r)               (r >= 0)
133
 
#define SWIG_ArgError(r)           ((r != SWIG_ERROR) ? r : SWIG_TypeError)  
 
133
#define SWIG_ArgError(r)           ((r != SWIG_ERROR) ? r : SWIG_TypeError)
134
134
 
135
135
/* The CastRankLimit says how many bits are used for the cast rank */
136
136
#define SWIG_CASTRANKLIMIT         (1 << 8)
161
161
#  endif
162
162
#  define SWIG_CASTRANKMASK          ((SWIG_CASTRANKLIMIT) -1)
163
163
#  define SWIG_CastRank(r)           (r & SWIG_CASTRANKMASK)
164
 
SWIGINTERNINLINE int SWIG_AddCast(int r) { 
 
164
SWIGINTERNINLINE int SWIG_AddCast(int r) {
165
165
  return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r;
166
166
}
167
 
SWIGINTERNINLINE int SWIG_CheckState(int r) { 
168
 
  return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0; 
 
167
SWIGINTERNINLINE int SWIG_CheckState(int r) {
 
168
  return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0;
169
169
}
170
170
#else /* no cast-rank mode */
171
 
#  define SWIG_AddCast
 
171
#  define SWIG_AddCast(r) (r)
172
172
#  define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0)
173
173
#endif
174
174
 
212
212
  void                    *clientdata;          /* Language specific module data */
213
213
} swig_module_info;
214
214
 
215
 
/* 
 
215
/*
216
216
  Compare two type names skipping the space characters, therefore
217
217
  "char*" == "char *" and "Class<int>" == "Class<int >", etc.
218
218
 
232
232
 
233
233
/*
234
234
  Check type equivalence in a name list like <name1>|<name2>|...
 
235
  Return 0 if equal, -1 if nb < tb, 1 if nb > tb
 
236
*/
 
237
SWIGRUNTIME int
 
238
SWIG_TypeCmp(const char *nb, const char *tb) {
 
239
  int equiv = 1;
 
240
  const char* te = tb + strlen(tb);
 
241
  const char* ne = nb;
 
242
  while (equiv != 0 && *ne) {
 
243
    for (nb = ne; *ne; ++ne) {
 
244
      if (*ne == '|') break;
 
245
    }
 
246
    equiv = SWIG_TypeNameComp(nb, ne, tb, te);
 
247
    if (*ne) ++ne;
 
248
  }
 
249
  return equiv;
 
250
}
 
251
 
 
252
/*
 
253
  Check type equivalence in a name list like <name1>|<name2>|...
235
254
  Return 0 if not equal, 1 if equal
236
255
*/
237
256
SWIGRUNTIME int
238
257
SWIG_TypeEquiv(const char *nb, const char *tb) {
239
 
  int equiv = 0;
240
 
  const char* te = tb + strlen(tb);
241
 
  const char* ne = nb;
242
 
  while (!equiv && *ne) {
243
 
    for (nb = ne; *ne; ++ne) {
244
 
      if (*ne == '|') break;
245
 
    }
246
 
    equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0;
247
 
    if (*ne) ++ne;
248
 
  }
249
 
  return equiv;
250
 
}
251
 
 
252
 
/*
253
 
  Check type equivalence in a name list like <name1>|<name2>|...
254
 
  Return 0 if equal, -1 if nb < tb, 1 if nb > tb
255
 
*/
256
 
SWIGRUNTIME int
257
 
SWIG_TypeCompare(const char *nb, const char *tb) {
258
 
  int equiv = 0;
259
 
  const char* te = tb + strlen(tb);
260
 
  const char* ne = nb;
261
 
  while (!equiv && *ne) {
262
 
    for (nb = ne; *ne; ++ne) {
263
 
      if (*ne == '|') break;
264
 
    }
265
 
    equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0;
266
 
    if (*ne) ++ne;
267
 
  }
268
 
  return equiv;
269
 
}
270
 
 
 
258
  return SWIG_TypeCmp(nb, tb) == 0 ? 1 : 0;
 
259
}
271
260
 
272
261
/*
273
262
  Check the typename
296
285
  return 0;
297
286
}
298
287
 
299
 
/* 
 
288
/*
300
289
  Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison
301
290
*/
302
291
SWIGRUNTIME swig_cast_info *
331
320
  return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory);
332
321
}
333
322
 
334
 
/* 
 
323
/*
335
324
   Dynamic pointer casting. Down an inheritance hierarchy
336
325
*/
337
326
SWIGRUNTIME swig_type_info *
375
364
    return type->name;
376
365
}
377
366
 
378
 
/* 
 
367
/*
379
368
   Set the clientdata field for a type
380
369
*/
381
370
SWIGRUNTIME void
383
372
  swig_cast_info *cast = ti->cast;
384
373
  /* if (ti->clientdata == clientdata) return; */
385
374
  ti->clientdata = clientdata;
386
 
  
 
375
 
387
376
  while (cast) {
388
377
    if (!cast->converter) {
389
378
      swig_type_info *tc = cast->type;
390
379
      if (!tc->clientdata) {
391
380
        SWIG_TypeClientData(tc, clientdata);
392
381
      }
393
 
    }    
 
382
    }
394
383
    cast = cast->next;
395
384
  }
396
385
}
399
388
  SWIG_TypeClientData(ti, clientdata);
400
389
  ti->owndata = 1;
401
390
}
402
 
  
 
391
 
403
392
/*
404
393
  Search for a swig_type_info structure only by mangled name
405
394
  Search is a O(log #types)
406
 
  
407
 
  We start searching at module start, and finish searching when start == end.  
 
395
 
 
396
  We start searching at module start, and finish searching when start == end.
408
397
  Note: if start == end at the beginning of the function, we go all the way around
409
398
  the circular list.
410
399
*/
411
400
SWIGRUNTIME swig_type_info *
412
 
SWIG_MangledTypeQueryModule(swig_module_info *start, 
413
 
                            swig_module_info *end, 
 
401
SWIG_MangledTypeQueryModule(swig_module_info *start,
 
402
                            swig_module_info *end,
414
403
                            const char *name) {
415
404
  swig_module_info *iter = start;
416
405
  do {
419
408
      register size_t r = iter->size - 1;
420
409
      do {
421
410
        /* since l+r >= 0, we can (>> 1) instead (/ 2) */
422
 
        register size_t i = (l + r) >> 1; 
 
411
        register size_t i = (l + r) >> 1;
423
412
        const char *iname = iter->types[i]->name;
424
413
        if (iname) {
425
414
          register int compare = strcmp(name, iname);
426
 
          if (compare == 0) {       
 
415
          if (compare == 0) {
427
416
            return iter->types[i];
428
417
          } else if (compare < 0) {
429
418
            if (i) {
448
437
  Search for a swig_type_info structure for either a mangled name or a human readable name.
449
438
  It first searches the mangled names of the types, which is a O(log #types)
450
439
  If a type is not found it then searches the human readable names, which is O(#types).
451
 
  
452
 
  We start searching at module start, and finish searching when start == end.  
 
440
 
 
441
  We start searching at module start, and finish searching when start == end.
453
442
  Note: if start == end at the beginning of the function, we go all the way around
454
443
  the circular list.
455
444
*/
456
445
SWIGRUNTIME swig_type_info *
457
 
SWIG_TypeQueryModule(swig_module_info *start, 
458
 
                     swig_module_info *end, 
 
446
SWIG_TypeQueryModule(swig_module_info *start,
 
447
                     swig_module_info *end,
459
448
                     const char *name) {
460
449
  /* STEP 1: Search the name field using binary search */
461
450
  swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name);
474
463
      iter = iter->next;
475
464
    } while (iter != end);
476
465
  }
477
 
  
 
466
 
478
467
  /* neither found a match */
479
468
  return 0;
480
469
}
481
470
 
482
 
/* 
 
471
/*
483
472
   Pack binary data into a string
484
473
*/
485
474
SWIGRUNTIME char *
495
484
  return c;
496
485
}
497
486
 
498
 
/* 
 
487
/*
499
488
   Unpack binary data from a string
500
489
*/
501
490
SWIGRUNTIME const char *
509
498
      uu = ((d - '0') << 4);
510
499
    else if ((d >= 'a') && (d <= 'f'))
511
500
      uu = ((d - ('a'-10)) << 4);
512
 
    else 
 
501
    else
513
502
      return (char *) 0;
514
503
    d = *(c++);
515
504
    if ((d >= '0') && (d <= '9'))
516
505
      uu |= (d - '0');
517
506
    else if ((d >= 'a') && (d <= 'f'))
518
507
      uu |= (d - ('a'-10));
519
 
    else 
 
508
    else
520
509
      return (char *) 0;
521
510
    *u = uu;
522
511
  }
523
512
  return c;
524
513
}
525
514
 
526
 
/* 
 
515
/*
527
516
   Pack 'void *' into a string buffer.
528
517
*/
529
518
SWIGRUNTIME char *