⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 core.c

📁 subversion-1.4.5.tar.gz 配置svn的源码
💻 C
📖 第 1 页 / 共 5 页
字号:
/* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). * Version 1.3.25 *  * This file is not intended to be easily readable and contains a number of  * coding conventions designed to improve portability and efficiency. Do not make * changes to this file unless you know what you are doing--modify the SWIG  * interface file instead.  * ----------------------------------------------------------------------------- *//*********************************************************************** * *  This section contains generic SWIG labels for method/variable *  declarations/attributes, and other compiler dependent labels. * ************************************************************************//* template workaround for compilers that cannot correctly implement the C++ standard */#ifndef SWIGTEMPLATEDISAMBIGUATOR#  if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560)#    define SWIGTEMPLATEDISAMBIGUATOR template#  else#    define SWIGTEMPLATEDISAMBIGUATOR #  endif#endif/* inline attribute */#ifndef SWIGINLINE# if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__))#   define SWIGINLINE inline# else#   define SWIGINLINE# endif#endif/* attribute recognised by some compilers to avoid 'unused' warnings */#ifndef SWIGUNUSED# if defined(__GNUC__) || defined(__ICC)#   define SWIGUNUSED __attribute__ ((unused)) # else#   define SWIGUNUSED # endif#endif/* internal SWIG method */#ifndef SWIGINTERN# define SWIGINTERN static SWIGUNUSED#endif/* internal inline SWIG method */#ifndef SWIGINTERNINLINE# define SWIGINTERNINLINE SWIGINTERN SWIGINLINE#endif/* exporting methods for Windows DLLs */#ifndef SWIGEXPORT# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)#   if defined(STATIC_LINKED)#     define SWIGEXPORT#   else#     define SWIGEXPORT __declspec(dllexport)#   endif# else#   define SWIGEXPORT# endif#endif/* calling conventions for Windows */#ifndef SWIGSTDCALL# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)#   define SWIGSTDCALL __stdcall# else#   define SWIGSTDCALL# endif #endif/* ruby.swg *//* Implementation : RUBY */#define SWIGRUBY 1#include "ruby.h"/* Flags for pointer conversion */#define SWIG_POINTER_EXCEPTION     0x1#define SWIG_POINTER_DISOWN        0x2#define NUM2USHRT(n) (\    (0 <= NUM2UINT(n) && NUM2UINT(n) <= USHRT_MAX)\    ? (unsigned short) NUM2UINT(n) \    : (rb_raise(rb_eArgError, "integer %d out of range of `unsigned short'",\               NUM2UINT(n)), (short)0)\)#define NUM2SHRT(n) (\    (SHRT_MIN <= NUM2INT(n) && NUM2INT(n) <= SHRT_MAX)\    ? (short)NUM2INT(n)\    : (rb_raise(rb_eArgError, "integer %d out of range of `short'",\               NUM2INT(n)), (short)0)\)/* Ruby 1.7 defines NUM2LL(), LL2NUM() and ULL2NUM() macros */#ifndef NUM2LL#define NUM2LL(x) NUM2LONG((x))#endif#ifndef LL2NUM#define LL2NUM(x) INT2NUM((long) (x))#endif#ifndef ULL2NUM#define ULL2NUM(x) UINT2NUM((unsigned long) (x))#endif/* Ruby 1.7 doesn't (yet) define NUM2ULL() */#ifndef NUM2ULL#ifdef HAVE_LONG_LONG#define NUM2ULL(x) rb_num2ull((x))#else#define NUM2ULL(x) NUM2ULONG(x)#endif#endif/* * Need to be very careful about how these macros are defined, especially * when compiling C++ code or C code with an ANSI C compiler. * * VALUEFUNC(f) is a macro used to typecast a C function that implements * a Ruby method so that it can be passed as an argument to API functions * like rb_define_method() and rb_define_singleton_method(). * * VOIDFUNC(f) is a macro used to typecast a C function that implements * either the "mark" or "free" stuff for a Ruby Data object, so that it * can be passed as an argument to API functions like Data_Wrap_Struct() * and Data_Make_Struct(). */ #ifdef __cplusplus#  ifndef RUBY_METHOD_FUNC /* These definitions should work for Ruby 1.4.6 */#    define PROTECTFUNC(f) ((VALUE (*)()) f)#    define VALUEFUNC(f) ((VALUE (*)()) f)#    define VOIDFUNC(f)  ((void (*)()) f)#  else#    ifndef ANYARGS /* These definitions should work for Ruby 1.6 */#      define PROTECTFUNC(f) ((VALUE (*)()) f)#      define VALUEFUNC(f) ((VALUE (*)()) f)#      define VOIDFUNC(f)  ((RUBY_DATA_FUNC) f)#    else /* These definitions should work for Ruby 1.7+ */#      define PROTECTFUNC(f) ((VALUE (*)(VALUE)) f)#      define VALUEFUNC(f) ((VALUE (*)(ANYARGS)) f)#      define VOIDFUNC(f)  ((RUBY_DATA_FUNC) f)#    endif#  endif#else#  define VALUEFUNC(f) (f)#  define VOIDFUNC(f) (f)#endiftypedef struct {  VALUE klass;  VALUE mImpl;  void  (*mark)(void *);  void  (*destroy)(void *);} swig_class;/* Don't use for expressions have side effect */#ifndef RB_STRING_VALUE#define RB_STRING_VALUE(s) (TYPE(s) == T_STRING ? (s) : (*(volatile VALUE *)&(s) = rb_str_to_str(s)))#endif#ifndef StringValue#define StringValue(s) RB_STRING_VALUE(s)#endif#ifndef StringValuePtr#define StringValuePtr(s) RSTRING(RB_STRING_VALUE(s))->ptr#endif#ifndef StringValueLen#define StringValueLen(s) RSTRING(RB_STRING_VALUE(s))->len#endif#ifndef SafeStringValue#define SafeStringValue(v) do {\    StringValue(v);\    rb_check_safe_str(v);\} while (0)#endif#ifndef HAVE_RB_DEFINE_ALLOC_FUNC#define rb_define_alloc_func(klass, func) rb_define_singleton_method((klass), "new", VALUEFUNC((func)), -1)#define rb_undef_alloc_func(klass) rb_undef_method(CLASS_OF((klass)), "new")#endif/* Contract support */#define SWIG_contract_assert(expr, msg) if (!(expr)) { rb_raise(rb_eRuntimeError, (char *) msg ); } else/*********************************************************************** * swigrun.swg * *     This file contains generic CAPI SWIG runtime support for pointer *     type checking. * ************************************************************************//* This should only be incremented when either the layout of swig_type_info changes,   or for whatever reason, the runtime changes incompatibly */#define SWIG_RUNTIME_VERSION "2"/* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */#ifdef SWIG_TYPE_TABLE# define SWIG_QUOTE_STRING(x) #x# define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x)# define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE)#else# define SWIG_TYPE_TABLE_NAME#endif/*  You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for  creating a static or dynamic library from the swig runtime code.  In 99.9% of the cases, swig just needs to declare them as 'static'.    But only do this if is strictly necessary, ie, if you have problems  with your compiler or so.*/#ifndef SWIGRUNTIME# define SWIGRUNTIME SWIGINTERN#endif#ifndef SWIGRUNTIMEINLINE# define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE#endif#include <string.h>#ifdef __cplusplusextern "C" {#endiftypedef void *(*swig_converter_func)(void *);typedef struct swig_type_info *(*swig_dycast_func)(void **);/* Structure to store inforomation on one type */typedef struct swig_type_info {  const char             *name;			/* mangled name of this type */  const char             *str;			/* human readable name of this type */  swig_dycast_func        dcast;		/* dynamic cast function down a hierarchy */  struct swig_cast_info  *cast;			/* linked list of types that can cast into this type */  void                   *clientdata;		/* language specific type data */} swig_type_info;/* Structure to store a type and conversion function used for casting */typedef struct swig_cast_info {  swig_type_info         *type;			/* pointer to type that is equivalent to this type */  swig_converter_func     converter;		/* function to cast the void pointers */  struct swig_cast_info  *next;			/* pointer to next cast in linked list */  struct swig_cast_info  *prev;			/* pointer to the previous cast */} swig_cast_info;/* Structure used to store module information * Each module generates one structure like this, and the runtime collects * all of these structures and stores them in a circularly linked list.*/typedef struct swig_module_info {  swig_type_info         **types;		/* Array of pointers to swig_type_info structures that are in this module */  size_t                 size;		        /* Number of types in this module */  struct swig_module_info *next;		/* Pointer to next element in circularly linked list */  swig_type_info         **type_initial;	/* Array of initially generated type structures */  swig_cast_info         **cast_initial;	/* Array of initially generated casting structures */  void                    *clientdata;		/* Language specific module data */} swig_module_info;/*   Compare two type names skipping the space characters, therefore  "char*" == "char *" and "Class<int>" == "Class<int >", etc.  Return 0 when the two name types are equivalent, as in  strncmp, but skipping ' '.*/SWIGRUNTIME intSWIG_TypeNameComp(const char *f1, const char *l1,		  const char *f2, const char *l2) {  for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) {    while ((*f1 == ' ') && (f1 != l1)) ++f1;    while ((*f2 == ' ') && (f2 != l2)) ++f2;    if (*f1 != *f2) return (int)(*f1 - *f2);  }  return (l1 - f1) - (l2 - f2);}/*  Check type equivalence in a name list like <name1>|<name2>|...  Return 0 if not equal, 1 if equal*/SWIGRUNTIME intSWIG_TypeEquiv(const char *nb, const char *tb) {  int equiv = 0;  const char* te = tb + strlen(tb);  const char* ne = nb;  while (!equiv && *ne) {    for (nb = ne; *ne; ++ne) {      if (*ne == '|') break;    }    equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0;    if (*ne) ++ne;  }  return equiv;}/*  Check type equivalence in a name list like <name1>|<name2>|...  Return 0 if equal, -1 if nb < tb, 1 if nb > tb*/SWIGRUNTIME intSWIG_TypeCompare(const char *nb, const char *tb) {  int equiv = 0;  const char* te = tb + strlen(tb);  const char* ne = nb;  while (!equiv && *ne) {    for (nb = ne; *ne; ++ne) {      if (*ne == '|') break;    }    equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0;    if (*ne) ++ne;  }  return equiv;}/* think of this as a c++ template<> or a scheme macro */#define SWIG_TypeCheck_Template(comparison, ty)         \  if (ty) {                                             \    swig_cast_info *iter = ty->cast;                    \    while (iter) {                                      \      if (comparison) {                                 \        if (iter == ty->cast) return iter;              \        /* Move iter to the top of the linked list */   \        iter->prev->next = iter->next;                  \        if (iter->next)                                 \          iter->next->prev = iter->prev;                \        iter->next = ty->cast;                          \        iter->prev = 0;                                 \        if (ty->cast) ty->cast->prev = iter;            \        ty->cast = iter;                                \        return iter;                                    \      }                                                 \      iter = iter->next;                                \    }                                                   \  }                                                     \  return 0/*  Check the typename*/SWIGRUNTIME swig_cast_info *SWIG_TypeCheck(const char *c, swig_type_info *ty) {  SWIG_TypeCheck_Template(strcmp(iter->type->name, c) == 0, ty);}/* Same as previous function, except strcmp is replaced with a pointer comparison */SWIGRUNTIME swig_cast_info *SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *into) {  SWIG_TypeCheck_Template(iter->type == from, into);}/*  Cast a pointer up an inheritance hierarchy*/SWIGRUNTIMEINLINE void *SWIG_TypeCast(swig_cast_info *ty, void *ptr) {  return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr);}/*    Dynamic pointer casting. Down an inheritance hierarchy*/SWIGRUNTIME swig_type_info *SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) {  swig_type_info *lastty = ty;  if (!ty || !ty->dcast) return ty;  while (ty && (ty->dcast)) {    ty = (*ty->dcast)(ptr);    if (ty) lastty = ty;  }  return lastty;}/*  Return the name associated with this type*/SWIGRUNTIMEINLINE const char *SWIG_TypeName(const swig_type_info *ty) {  return ty->name;}/*  Return the pretty name associated with this type,  that is an unmangled type name in a form presentable to the user.*/SWIGRUNTIME const char *SWIG_TypePrettyName(const swig_type_info *type) {  /* The "str" field contains the equivalent pretty names of the     type, separated by vertical-bar characters.  We choose     to print the last name, as it is often (?) the most     specific. */  if (type->str != NULL) {    const char *last_name = type->str;    const char *s;    for (s = type->str; *s; s++)      if (*s == '|') last_name = s+1;    return last_name;  }  else    return type->name;}/*    Set the clientdata field for a type*/SWIGRUNTIME voidSWIG_TypeClientData(swig_type_info *ti, void *clientdata) {  if (!ti->clientdata) {    swig_cast_info *cast = ti->cast;    /* if (ti->clientdata == clientdata) return; */    ti->clientdata = clientdata;        while (cast) {      if (!cast->converter)	SWIG_TypeClientData(cast->type, clientdata);      cast = cast->next;    }  }}/*  Search for a swig_type_info structure only by mangled name  Search is a O(log #types)    We start searching at module start, and finish searching when start == end.    Note: if start == end at the beginning of the function, we go all the way around  the circular list.*/SWIGRUNTIME swig_type_info *SWIG_MangledTypeQueryModule(swig_module_info *start,                             swig_module_info *end, 		            const char *name) {  swig_module_info *iter = start;  do {    if (iter->size) {      register size_t l = 0;      register size_t r = iter->size - 1;      do {	/* since l+r >= 0, we can (>> 1) instead (/ 2) */	register size_t i = (l + r) >> 1; 	const char *iname = iter->types[i]->name;	if (iname) {	  register int compare = strcmp(name, iname);	  if (compare == 0) {	    	    return iter->types[i];	  } else if (compare < 0) {	    if (i) {	      r = i - 1;	    } else {	      break;	    }	  } else if (compare > 0) {	    l = i + 1;	  }	} else {	  break; /* should never happen */	}      } while (l <= r);    }    iter = iter->next;  } while (iter != end);  return 0;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -