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 /
ocaml /
[ HOME SHELL ]
Name
Size
Permission
Action
carray.i
3.18
KB
-rw-r--r--
class.swg
1.68
KB
-rw-r--r--
cstring.i
5.93
KB
-rw-r--r--
director.swg
2.94
KB
-rw-r--r--
ocaml.i
1.42
KB
-rw-r--r--
ocaml.swg
14.05
KB
-rw-r--r--
ocamldec.swg
5.21
KB
-rw-r--r--
ocamlkw.swg
1.04
KB
-rw-r--r--
preamble.swg
473
B
-rw-r--r--
std_common.i
531
B
-rw-r--r--
std_complex.i
1.51
KB
-rw-r--r--
std_deque.i
722
B
-rw-r--r--
std_list.i
4.22
KB
-rw-r--r--
std_map.i
2.28
KB
-rw-r--r--
std_pair.i
712
B
-rw-r--r--
std_string.i
3.13
KB
-rw-r--r--
std_vector.i
2.69
KB
-rw-r--r--
stl.i
357
B
-rw-r--r--
swig.ml
4.57
KB
-rw-r--r--
swig.mli
1.66
KB
-rw-r--r--
swigp4.ml
6.5
KB
-rw-r--r--
typecheck.i
4.59
KB
-rw-r--r--
typemaps.i
8.83
KB
-rw-r--r--
typeregister.swg
55
B
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : std_vector.i
/* ----------------------------------------------------------------------------- * std_vector.i * * SWIG typemaps for std::vector types * ----------------------------------------------------------------------------- */ %include <std_common.i> // ------------------------------------------------------------------------ // std::vector // // The aim of all that follows would be to integrate std::vector with // Python as much as possible, namely, to allow the user to pass and // be returned Python tuples or lists. // const declarations are used to guess the intent of the function being // exported; therefore, the following rationale is applied: // // -- f(std::vector<T>), f(const std::vector<T>&), f(const std::vector<T>*): // the parameter being read-only, either a Python sequence or a // previously wrapped std::vector<T> can be passed. // -- f(std::vector<T>&), f(std::vector<T>*): // the parameter must be modified; therefore, only a wrapped std::vector // can be passed. // -- std::vector<T> f(): // the vector is returned by copy; therefore, a Python sequence of T:s // is returned which is most easily used in other Python functions // -- std::vector<T>& f(), std::vector<T>* f(), const std::vector<T>& f(), // const std::vector<T>* f(): // the vector is returned by reference; therefore, a wrapped std::vector // is returned // ------------------------------------------------------------------------ %{ #include <vector> #include <algorithm> #include <stdexcept> %} // exported class namespace std { template <class T> class vector { public: vector(unsigned int size = 0); vector(unsigned int size, const T& value); vector(const vector<T>&); unsigned int size() const; bool empty() const; void clear(); void push_back(const T& x); T operator [] ( int f ); vector <T> &operator = ( vector <T> &other ); %extend { void set( int i, const T &x ) { self->resize(i+1); (*self)[i] = x; } }; %extend { T *to_array() { T *array = new T[self->size() + 1]; for( int i = 0; i < self->size(); i++ ) array[i] = (*self)[i]; return array; } }; }; }; %insert(ml) %{ let array_to_vector v argcons array = for i = 0 to (Array.length array) - 1 do (invoke v) "set" (C_list [ C_int i ; (argcons array.(i)) ]) done ; v let vector_to_array v argcons array = for i = 0; to (get_int ((invoke v) "size" C_void)) - 1 do array.(i) <- argcons ((invoke v) "[]" (C_int i)) done ; v %} %insert(mli) %{ val array_to_vector : c_obj -> ('a -> c_obj) -> 'a array -> c_obj val vector_to_array : c_obj -> (c_obj -> 'a) -> 'a array -> c_obj %}
Close