Alien-SVN
view release on metacpan or search on metacpan
src/subversion/subversion/bindings/swig/perl/native/core.c view on Meta::CPAN
#define SWIG_SystemError -10
#define SWIG_AttributeError -11
#define SWIG_MemoryError -12
#define SWIG_NullReferenceError -13
#ifdef __cplusplus
/* Needed on some windows machines---since MS plays funny games with the header files under C++ */
#include <math.h>
#include <stdlib.h>
extern "C" {
#endif
#include "EXTERN.h"
#include "perl.h"
#include "XSUB.h"
/* Add in functionality missing in older versions of Perl. Much of this is based on Devel-PPPort on cpan. */
/* Add PERL_REVISION, PERL_VERSION, PERL_SUBVERSION if missing */
#ifndef PERL_REVISION
# if !defined(__PATCHLEVEL_H_INCLUDED__) && !(defined(PATCHLEVEL) && defined(SUBVERSION))
# define PERL_PATCHLEVEL_H_IMPLICIT
# include <patchlevel.h>
# endif
# if !(defined(PERL_VERSION) || (defined(SUBVERSION) && defined(PATCHLEVEL)))
# include <could_not_find_Perl_patchlevel.h>
# endif
# ifndef PERL_REVISION
# define PERL_REVISION (5)
# define PERL_VERSION PATCHLEVEL
# define PERL_SUBVERSION SUBVERSION
# endif
#endif
#if defined(WIN32) && defined(PERL_OBJECT) && !defined(PerlIO_exportFILE)
#define PerlIO_exportFILE(fh,fl) (FILE*)(fh)
#endif
#ifndef SvIOK_UV
# define SvIOK_UV(sv) (SvIOK(sv) && (SvUVX(sv) == SvIVX(sv)))
#endif
#ifndef SvUOK
# define SvUOK(sv) SvIOK_UV(sv)
#endif
#if ((PERL_VERSION < 4) || ((PERL_VERSION == 4) && (PERL_SUBVERSION <= 5)))
# define PL_sv_undef sv_undef
# define PL_na na
# define PL_errgv errgv
# define PL_sv_no sv_no
# define PL_sv_yes sv_yes
# define PL_markstack_ptr markstack_ptr
#endif
#ifndef IVSIZE
# ifdef LONGSIZE
# define IVSIZE LONGSIZE
# else
# define IVSIZE 4 /* A bold guess, but the best we can make. */
# endif
#endif
#ifndef INT2PTR
# if (IVSIZE == PTRSIZE) && (UVSIZE == PTRSIZE)
# define PTRV UV
# define INT2PTR(any,d) (any)(d)
# else
# if PTRSIZE == LONGSIZE
# define PTRV unsigned long
# else
# define PTRV unsigned
# endif
# define INT2PTR(any,d) (any)(PTRV)(d)
# endif
# define NUM2PTR(any,d) (any)(PTRV)(d)
# define PTR2IV(p) INT2PTR(IV,p)
# define PTR2UV(p) INT2PTR(UV,p)
# define PTR2NV(p) NUM2PTR(NV,p)
# if PTRSIZE == LONGSIZE
# define PTR2ul(p) (unsigned long)(p)
# else
# define PTR2ul(p) INT2PTR(unsigned long,p)
# endif
#endif /* !INT2PTR */
#ifndef SvPV_nolen
# define SvPV_nolen(x) SvPV(x,PL_na)
#endif
#ifndef get_sv
# define get_sv perl_get_sv
#endif
#ifndef ERRSV
# define ERRSV get_sv("@",FALSE)
#endif
#ifndef pTHX_
#define pTHX_
#endif
#include <string.h>
#ifdef __cplusplus
}
#endif
/* -----------------------------------------------------------------------------
* error manipulation
* ----------------------------------------------------------------------------- */
SWIGINTERN const char*
SWIG_Perl_ErrorType(int code) {
switch(code) {
case SWIG_MemoryError:
return "MemoryError";
case SWIG_IOError:
return "IOError";
src/subversion/subversion/bindings/swig/perl/native/core.c view on Meta::CPAN
}
if ((items < 1) || (items > 1)) {
SWIG_croak("Usage: svn_strerror(statcode,bufsize);");
}
ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
if (!SWIG_IsOK(ecode1)) {
SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "svn_strerror" "', argument " "1"" of type '" "apr_status_t""'");
}
arg1 = (apr_status_t)(val1);
{
result = (char *)svn_strerror(arg1,arg2,arg3);
}
ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ;
XSRETURN(argvi);
fail:
SWIG_croak_null();
}
}
XS(_wrap_svn_error_symbolic_name) {
{
apr_status_t arg1 ;
int val1 ;
int ecode1 = 0 ;
int argvi = 0;
char *result = 0 ;
dXSARGS;
if ((items < 1) || (items > 1)) {
SWIG_croak("Usage: svn_error_symbolic_name(statcode);");
}
ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
if (!SWIG_IsOK(ecode1)) {
SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "svn_error_symbolic_name" "', argument " "1"" of type '" "apr_status_t""'");
}
arg1 = (apr_status_t)(val1);
{
result = (char *)svn_error_symbolic_name(arg1);
}
ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ;
XSRETURN(argvi);
fail:
SWIG_croak_null();
}
}
XS(_wrap_svn_err_best_message) {
{
svn_error_t *arg1 = (svn_error_t *) 0 ;
char *arg2 = (char *) 0 ;
apr_size_t arg3 ;
void *argp1 = 0 ;
int res1 = 0 ;
char temp2[128] ;
int argvi = 0;
char *result = 0 ;
dXSARGS;
{
memset (temp2,0,128); /* paranoia */
arg2 = temp2;
arg3 = 128;
}
if ((items < 1) || (items > 1)) {
SWIG_croak("Usage: svn_err_best_message(err,bufsize);");
}
res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_svn_error_t, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "svn_err_best_message" "', argument " "1"" of type '" "svn_error_t *""'");
}
arg1 = (svn_error_t *)(argp1);
{
result = (char *)svn_err_best_message(arg1,arg2,arg3);
}
ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ;
XSRETURN(argvi);
fail:
SWIG_croak_null();
}
}
XS(_wrap_svn_error_create) {
{
apr_status_t arg1 ;
svn_error_t *arg2 = (svn_error_t *) 0 ;
char *arg3 = (char *) 0 ;
int val1 ;
int ecode1 = 0 ;
void *argp2 = 0 ;
int res2 = 0 ;
int res3 ;
char *buf3 = 0 ;
int alloc3 = 0 ;
int argvi = 0;
svn_error_t *result = 0 ;
dXSARGS;
if ((items < 3) || (items > 3)) {
SWIG_croak("Usage: svn_error_create(apr_err,child,message);");
}
ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
if (!SWIG_IsOK(ecode1)) {
SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "svn_error_create" "', argument " "1"" of type '" "apr_status_t""'");
}
arg1 = (apr_status_t)(val1);
res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_svn_error_t, 0 | 0 );
if (!SWIG_IsOK(res2)) {
SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "svn_error_create" "', argument " "2"" of type '" "svn_error_t *""'");
}
arg2 = (svn_error_t *)(argp2);
res3 = SWIG_AsCharPtrAndSize(ST(2), &buf3, NULL, &alloc3);
if (!SWIG_IsOK(res3)) {
SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "svn_error_create" "', argument " "3"" of type '" "char const *""'");
}
arg3 = (char *)(buf3);
{
result = (svn_error_t *)svn_error_create(arg1,arg2,(char const *)arg3);
}
{
if (result) {
SV *exception_handler = perl_get_sv ("SVN::Error::handler", FALSE);
src/subversion/subversion/bindings/swig/perl/native/core.c view on Meta::CPAN
{"SVN::_Core::svn_diff_mem_string_output_unified2", _wrap_svn_diff_mem_string_output_unified2},
{"SVN::_Core::svn_diff_mem_string_output_unified", _wrap_svn_diff_mem_string_output_unified},
{"SVN::_Core::svn_diff_mem_string_output_merge2", _wrap_svn_diff_mem_string_output_merge2},
{"SVN::_Core::svn_diff_mem_string_output_merge", _wrap_svn_diff_mem_string_output_merge},
{"SVN::_Core::svn_diff_hunk_readline_diff_text", _wrap_svn_diff_hunk_readline_diff_text},
{"SVN::_Core::svn_diff_hunk_readline_original_text", _wrap_svn_diff_hunk_readline_original_text},
{"SVN::_Core::svn_diff_hunk_readline_modified_text", _wrap_svn_diff_hunk_readline_modified_text},
{"SVN::_Core::svn_diff_hunk_reset_diff_text", _wrap_svn_diff_hunk_reset_diff_text},
{"SVN::_Core::svn_diff_hunk_reset_original_text", _wrap_svn_diff_hunk_reset_original_text},
{"SVN::_Core::svn_diff_hunk_reset_modified_text", _wrap_svn_diff_hunk_reset_modified_text},
{"SVN::_Core::svn_diff_hunk_get_original_start", _wrap_svn_diff_hunk_get_original_start},
{"SVN::_Core::svn_diff_hunk_get_original_length", _wrap_svn_diff_hunk_get_original_length},
{"SVN::_Core::svn_diff_hunk_get_modified_start", _wrap_svn_diff_hunk_get_modified_start},
{"SVN::_Core::svn_diff_hunk_get_modified_length", _wrap_svn_diff_hunk_get_modified_length},
{"SVN::_Core::svn_diff_hunk_get_leading_context", _wrap_svn_diff_hunk_get_leading_context},
{"SVN::_Core::svn_diff_hunk_get_trailing_context", _wrap_svn_diff_hunk_get_trailing_context},
{"SVN::_Core::svn_prop_patch_t_name_set", _wrap_svn_prop_patch_t_name_set},
{"SVN::_Core::svn_prop_patch_t_name_get", _wrap_svn_prop_patch_t_name_get},
{"SVN::_Core::svn_prop_patch_t_operation_set", _wrap_svn_prop_patch_t_operation_set},
{"SVN::_Core::svn_prop_patch_t_operation_get", _wrap_svn_prop_patch_t_operation_get},
{"SVN::_Core::svn_prop_patch_t_hunks_set", _wrap_svn_prop_patch_t_hunks_set},
{"SVN::_Core::svn_prop_patch_t_hunks_get", _wrap_svn_prop_patch_t_hunks_get},
{"SVN::_Core::new_svn_prop_patch_t", _wrap_new_svn_prop_patch_t},
{"SVN::_Core::delete_svn_prop_patch_t", _wrap_delete_svn_prop_patch_t},
{"SVN::_Core::svn_patch_t_old_filename_set", _wrap_svn_patch_t_old_filename_set},
{"SVN::_Core::svn_patch_t_old_filename_get", _wrap_svn_patch_t_old_filename_get},
{"SVN::_Core::svn_patch_t_new_filename_set", _wrap_svn_patch_t_new_filename_set},
{"SVN::_Core::svn_patch_t_new_filename_get", _wrap_svn_patch_t_new_filename_get},
{"SVN::_Core::svn_patch_t_hunks_set", _wrap_svn_patch_t_hunks_set},
{"SVN::_Core::svn_patch_t_hunks_get", _wrap_svn_patch_t_hunks_get},
{"SVN::_Core::svn_patch_t_prop_patches_set", _wrap_svn_patch_t_prop_patches_set},
{"SVN::_Core::svn_patch_t_prop_patches_get", _wrap_svn_patch_t_prop_patches_get},
{"SVN::_Core::svn_patch_t_operation_set", _wrap_svn_patch_t_operation_set},
{"SVN::_Core::svn_patch_t_operation_get", _wrap_svn_patch_t_operation_get},
{"SVN::_Core::svn_patch_t_reverse_set", _wrap_svn_patch_t_reverse_set},
{"SVN::_Core::svn_patch_t_reverse_get", _wrap_svn_patch_t_reverse_get},
{"SVN::_Core::new_svn_patch_t", _wrap_new_svn_patch_t},
{"SVN::_Core::delete_svn_patch_t", _wrap_delete_svn_patch_t},
{"SVN::_Core::svn_diff_open_patch_file", _wrap_svn_diff_open_patch_file},
{"SVN::_Core::svn_diff_parse_next_patch", _wrap_svn_diff_parse_next_patch},
{"SVN::_Core::svn_diff_close_patch_file", _wrap_svn_diff_close_patch_file},
{"SVN::_Core::svn_diff_fns2_invoke_datasources_open", _wrap_svn_diff_fns2_invoke_datasources_open},
{"SVN::_Core::svn_diff_fns2_invoke_datasource_close", _wrap_svn_diff_fns2_invoke_datasource_close},
{"SVN::_Core::svn_diff_fns2_invoke_datasource_get_next_token", _wrap_svn_diff_fns2_invoke_datasource_get_next_token},
{"SVN::_Core::svn_diff_fns2_invoke_token_compare", _wrap_svn_diff_fns2_invoke_token_compare},
{"SVN::_Core::svn_diff_fns2_invoke_token_discard", _wrap_svn_diff_fns2_invoke_token_discard},
{"SVN::_Core::svn_diff_fns2_invoke_token_discard_all", _wrap_svn_diff_fns2_invoke_token_discard_all},
{"SVN::_Core::svn_diff_fns_invoke_datasource_open", _wrap_svn_diff_fns_invoke_datasource_open},
{"SVN::_Core::svn_diff_fns_invoke_datasource_close", _wrap_svn_diff_fns_invoke_datasource_close},
{"SVN::_Core::svn_diff_fns_invoke_datasource_get_next_token", _wrap_svn_diff_fns_invoke_datasource_get_next_token},
{"SVN::_Core::svn_diff_fns_invoke_token_compare", _wrap_svn_diff_fns_invoke_token_compare},
{"SVN::_Core::svn_diff_fns_invoke_token_discard", _wrap_svn_diff_fns_invoke_token_discard},
{"SVN::_Core::svn_diff_fns_invoke_token_discard_all", _wrap_svn_diff_fns_invoke_token_discard_all},
{"SVN::_Core::svn_diff_output_fns_invoke_output_common", _wrap_svn_diff_output_fns_invoke_output_common},
{"SVN::_Core::svn_diff_output_fns_invoke_output_diff_modified", _wrap_svn_diff_output_fns_invoke_output_diff_modified},
{"SVN::_Core::svn_diff_output_fns_invoke_output_diff_latest", _wrap_svn_diff_output_fns_invoke_output_diff_latest},
{"SVN::_Core::svn_diff_output_fns_invoke_output_diff_common", _wrap_svn_diff_output_fns_invoke_output_diff_common},
{"SVN::_Core::svn_diff_output_fns_invoke_output_conflict", _wrap_svn_diff_output_fns_invoke_output_conflict},
{"SVN::_Core::svn_strerror", _wrap_svn_strerror},
{"SVN::_Core::svn_error_symbolic_name", _wrap_svn_error_symbolic_name},
{"SVN::_Core::svn_err_best_message", _wrap_svn_err_best_message},
{"SVN::_Core::svn_error_create", _wrap_svn_error_create},
{"SVN::_Core::svn_error_createf", _wrap_svn_error_createf},
{"SVN::_Core::svn_error_wrap_apr", _wrap_svn_error_wrap_apr},
{"SVN::_Core::svn_error_quick_wrap", _wrap_svn_error_quick_wrap},
{"SVN::_Core::svn_error_compose_create", _wrap_svn_error_compose_create},
{"SVN::_Core::svn_error_compose", _wrap_svn_error_compose},
{"SVN::_Core::svn_error_root_cause", _wrap_svn_error_root_cause},
{"SVN::_Core::svn_error_find_cause", _wrap_svn_error_find_cause},
{"SVN::_Core::svn_error_dup", _wrap_svn_error_dup},
{"SVN::_Core::svn_error_clear", _wrap_svn_error_clear},
{"SVN::_Core::svn_handle_error2", _wrap_svn_handle_error2},
{"SVN::_Core::svn_handle_error", _wrap_svn_handle_error},
{"SVN::_Core::svn_handle_warning2", _wrap_svn_handle_warning2},
{"SVN::_Core::svn_handle_warning", _wrap_svn_handle_warning},
{"SVN::_Core::svn_error_purge_tracing", _wrap_svn_error_purge_tracing},
{"SVN::_Core::svn_error__malfunction", _wrap_svn_error__malfunction},
{"SVN::_Core::svn_error_set_malfunction_handler", _wrap_svn_error_set_malfunction_handler},
{"SVN::_Core::svn_error_raise_on_malfunction", _wrap_svn_error_raise_on_malfunction},
{"SVN::_Core::svn_error_abort_on_malfunction", _wrap_svn_error_abort_on_malfunction},
{"SVN::_Core::svn_error_invoke_malfunction_handler", _wrap_svn_error_invoke_malfunction_handler},
{0,0}
};
/* -----------------------------------------------------------------------------
* Type initialization:
* This problem is tough by the requirement that no dynamic
* memory is used. Also, since swig_type_info structures store pointers to
* swig_cast_info structures and swig_cast_info structures store pointers back
* to swig_type_info structures, we need some lookup code at initialization.
* The idea is that swig generates all the structures that are needed.
* The runtime then collects these partially filled structures.
* The SWIG_InitializeModule function takes these initial arrays out of
* swig_module, and does all the lookup, filling in the swig_module.types
* array with the correct data and linking the correct swig_cast_info
* structures together.
*
* The generated swig_type_info structures are assigned staticly to an initial
* array. We just loop through that array, and handle each type individually.
* First we lookup if this type has been already loaded, and if so, use the
* loaded structure instead of the generated one. Then we have to fill in the
* cast linked list. The cast data is initially stored in something like a
* two-dimensional array. Each row corresponds to a type (there are the same
* number of rows as there are in the swig_type_initial array). Each entry in
* a column is one of the swig_cast_info structures for that type.
* The cast_initial array is actually an array of arrays, because each row has
* a variable number of columns. So to actually build the cast linked list,
* we find the array of casts associated with the type, and loop through it
* adding the casts to the list. The one last trick we need to do is making
* sure the type pointer in the swig_cast_info struct is correct.
*
* First off, we lookup the cast->type name to see if it is already loaded.
* There are three cases to handle:
* 1) If the cast->type has already been loaded AND the type we are adding
* casting info to has not been loaded (it is in this module), THEN we
* replace the cast->type pointer with the type pointer that has already
* been loaded.
* 2) If BOTH types (the one we are adding casting info to, and the
* cast->type) are loaded, THEN the cast info has already been loaded by
* the previous module so we just ignore it.
* 3) Finally, if cast->type has not already been loaded, then we add that
* swig_cast_info to the linked list (because the cast->type) pointer will
( run in 0.597 second using v1.01-cache-2.11-cpan-d7f47b0818f )