Linux server2.hpierson.com 3.10.0-1160.105.1.el7.x86_64 #1 SMP Thu Dec 7 15:39:45 UTC 2023 x86_64
Apache
: 162.0.216.123 | : 216.73.216.152
28 Domain
?7.4.33
yvffpqmy
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
README
+ Create Folder
+ Create File
/
usr /
share /
swig /
2.0.10 /
ruby /
[ HOME SHELL ]
Name
Size
Permission
Action
Makefile.swig
943
B
-rw-r--r--
argcargv.i
1.2
KB
-rw-r--r--
attribute.i
34
B
-rw-r--r--
carrays.i
129
B
-rw-r--r--
cdata.i
30
B
-rw-r--r--
cmalloc.i
32
B
-rw-r--r--
cni.i
42
B
-rw-r--r--
cpointer.i
33
B
-rw-r--r--
cstring.i
32
B
-rw-r--r--
director.swg
8.11
KB
-rw-r--r--
embed.i
169
B
-rw-r--r--
exception.i
126
B
-rw-r--r--
extconf.rb
234
B
-rw-r--r--
factory.i
32
B
-rw-r--r--
file.i
639
B
-rw-r--r--
jstring.i
952
B
-rw-r--r--
progargcargv.i
770
B
-rw-r--r--
ruby.swg
2.59
KB
-rw-r--r--
rubyapi.swg
801
B
-rw-r--r--
rubyautodoc.swg
4.26
KB
-rw-r--r--
rubyclasses.swg
11.1
KB
-rw-r--r--
rubycomplex.swg
3.63
KB
-rw-r--r--
rubycontainer.swg
26.47
KB
-rw-r--r--
rubycontainer_extended.swg
3.46
KB
-rw-r--r--
rubydef.swg
42
B
-rw-r--r--
rubyerrors.swg
3.63
KB
-rw-r--r--
rubyfragments.swg
552
B
-rw-r--r--
rubyhead.swg
4.18
KB
-rw-r--r--
rubyinit.swg
39
B
-rw-r--r--
rubyiterators.swg
22.29
KB
-rw-r--r--
rubykw.swg
1.15
KB
-rw-r--r--
rubymacros.swg
456
B
-rw-r--r--
rubyopers.swg
1.81
KB
-rw-r--r--
rubyprimtypes.swg
5.09
KB
-rw-r--r--
rubyrun.swg
13.24
KB
-rw-r--r--
rubyruntime.swg
423
B
-rw-r--r--
rubystdautodoc.swg
1.78
KB
-rw-r--r--
rubystdcommon.swg
5.01
KB
-rw-r--r--
rubystdfunctors.swg
4.1
KB
-rw-r--r--
rubystrings.swg
1.53
KB
-rw-r--r--
rubytracking.swg
5.04
KB
-rw-r--r--
rubytypemaps.swg
1.76
KB
-rw-r--r--
rubyuserdir.swg
657
B
-rw-r--r--
rubywstrings.swg
2.4
KB
-rw-r--r--
std_alloc.i
27
B
-rw-r--r--
std_basic_string.i
2.58
KB
-rw-r--r--
std_char_traits.i
33
B
-rw-r--r--
std_common.i
2.28
KB
-rw-r--r--
std_complex.i
471
B
-rw-r--r--
std_container.i
60
B
-rw-r--r--
std_deque.i
732
B
-rw-r--r--
std_except.i
35
B
-rw-r--r--
std_functors.i
768
B
-rw-r--r--
std_ios.i
380
B
-rw-r--r--
std_iostream.i
227
B
-rw-r--r--
std_list.i
1.01
KB
-rw-r--r--
std_map.i
10.89
KB
-rw-r--r--
std_multimap.i
5.94
KB
-rw-r--r--
std_multiset.i
1.37
KB
-rw-r--r--
std_pair.i
5.21
KB
-rw-r--r--
std_queue.i
851
B
-rw-r--r--
std_set.i
6.38
KB
-rw-r--r--
std_sstream.i
30
B
-rw-r--r--
std_stack.i
853
B
-rw-r--r--
std_streambuf.i
31
B
-rw-r--r--
std_string.i
190
B
-rw-r--r--
std_vector.i
1.19
KB
-rw-r--r--
std_vectora.i
950
B
-rw-r--r--
std_wstring.i
65
B
-rw-r--r--
stl.i
357
B
-rw-r--r--
timeval.i
1.15
KB
-rw-r--r--
typemaps.i
11.05
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : std_pair.i
/* Pairs */ %include <rubystdcommon.swg> //#define SWIG_STD_PAIR_ASVAL %fragment("StdPairTraits","header",fragment="StdTraits") { namespace swig { template <class T, class U > struct traits_asval<std::pair<T,U> > { typedef std::pair<T,U> value_type; static int get_pair(VALUE first, VALUE second, std::pair<T,U> *val) { if (val) { T *pfirst = &(val->first); int res1 = swig::asval((VALUE)first, pfirst); if (!SWIG_IsOK(res1)) return res1; U *psecond = &(val->second); int res2 = swig::asval((VALUE)second, psecond); if (!SWIG_IsOK(res2)) return res2; return res1 > res2 ? res1 : res2; } else { T *pfirst = 0; int res1 = swig::asval((VALUE)first, pfirst); if (!SWIG_IsOK(res1)) return res1; U *psecond = 0; int res2 = swig::asval((VALUE)second, psecond); if (!SWIG_IsOK(res2)) return res2; return res1 > res2 ? res1 : res2; } } static int asval(VALUE obj, std::pair<T,U> *val) { int res = SWIG_ERROR; if ( TYPE(obj) == T_ARRAY ) { if (RARRAY_LEN(obj) == 2) { VALUE first = rb_ary_entry(obj,0); VALUE second = rb_ary_entry(obj,1); res = get_pair(first, second, val); } } else { value_type *p; res = SWIG_ConvertPtr(obj,(void**)&p, swig::type_info<value_type>(),0); if (SWIG_IsOK(res) && val) *val = *p; } return res; } }; template <class T, class U > struct traits_asptr<std::pair<T,U> > { typedef std::pair<T,U> value_type; static int get_pair(VALUE first, VALUE second, std::pair<T,U> **val) { if (val) { value_type *vp = %new_instance(std::pair<T,U>); T *pfirst = &(vp->first); int res1 = swig::asval((VALUE)first, pfirst); if (!SWIG_IsOK(res1)) return res1; U *psecond = &(vp->second); int res2 = swig::asval((VALUE)second, psecond); if (!SWIG_IsOK(res2)) return res2; *val = vp; return SWIG_AddNewMask(res1 > res2 ? res1 : res2); } else { T *pfirst = 0; int res1 = swig::asval((VALUE)first, pfirst); if (!SWIG_IsOK(res1)) return res1; U *psecond = 0; int res2 = swig::asval((VALUE)second, psecond); if (!SWIG_IsOK(res2)) return res2; return res1 > res2 ? res1 : res2; } } static int asptr(VALUE obj, std::pair<T,U> **val) { int res = SWIG_ERROR; if ( TYPE(obj) == T_ARRAY ) { if ( RARRAY_LEN(obj) == 2) { VALUE first = rb_ary_entry(obj,0); VALUE second = rb_ary_entry(obj,1); res = get_pair(first, second, val); } } else { value_type *p; res = SWIG_ConvertPtr(obj,(void**)&p, swig::type_info<value_type>(),0); if (SWIG_IsOK(res) && val) *val = p; } return res; } }; template <class T, class U > struct traits_from<std::pair<T,U> > { static VALUE _wrap_pair_second( VALUE self ) { std::pair< typename swig::noconst_traits<T >::noconst_type,U>* p = NULL; swig::asptr( self, &p ); return swig::from( p->second ); } static VALUE _wrap_pair_second_eq( VALUE self, VALUE arg ) { std::pair< typename swig::noconst_traits<T >::noconst_type,U>* p = NULL; swig::asptr( self, &p ); return swig::from( p->second ); } static VALUE from(const std::pair<T,U>& val) { VALUE obj = rb_ary_new2(2); rb_ary_push(obj, swig::from<typename swig::noconst_traits<T >::noconst_type>(val.first)); rb_ary_push(obj, swig::from(val.second)); rb_define_singleton_method(obj, "second", VALUEFUNC(_wrap_pair_second), 0 ); rb_define_singleton_method(obj, "second=", VALUEFUNC(_wrap_pair_second_eq), 1 ); rb_obj_freeze(obj); // treat as immutable tuple return obj; } }; } } // Missing typemap %typemap(in) std::pair* (int res) { res = swig::asptr( $input, &$1 ); if (!SWIG_IsOK(res)) %argument_fail(res, "$1_type", $symname, $argnum); } %define %swig_pair_methods(pair...) %extend { VALUE inspect() const { VALUE tmp; const char *type_name = swig::type_name< pair >(); VALUE str = rb_str_new2( type_name ); str = rb_str_cat2( str, " (" ); tmp = swig::from( $self->first ); tmp = rb_obj_as_string( tmp ); str = rb_str_buf_append( str, tmp ); str = rb_str_cat2( str, "," ); tmp = swig::from( $self->second ); tmp = rb_obj_as_string( tmp ); str = rb_str_buf_append( str, tmp ); str = rb_str_cat2( str, ")" ); return str; } VALUE to_s() const { VALUE tmp; VALUE str = rb_str_new2( "(" ); tmp = swig::from( $self->first ); tmp = rb_obj_as_string( tmp ); str = rb_str_buf_append( str, tmp ); str = rb_str_cat2( str, "," ); tmp = swig::from( $self->second ); tmp = rb_obj_as_string( tmp ); str = rb_str_buf_append( str, tmp ); str = rb_str_cat2( str, ")" ); return str; } VALUE __getitem__( int index ) { if (( index % 2 ) == 0 ) return swig::from( $self->first ); else return swig::from( $self->second ); } VALUE __setitem__( int index, VALUE obj ) { int res; if (( index % 2 ) == 0 ) { res = swig::asval( obj, &($self->first) ); } else { res = swig::asval(obj, &($self->second) ); } if (!SWIG_IsOK(res)) rb_raise( rb_eArgError, "invalid item for " #pair ); return obj; } } // extend %enddef %include <std/std_pair.i>
Close