-
Notifications
You must be signed in to change notification settings - Fork 0
/
typemap
41 lines (39 loc) · 986 Bytes
/
typemap
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
TYPEMAP
XClient * T_CASSANDRA
XAccessLevel T_IV
XConsistencyLevel T_IV
string T_CPPSTRING
int64_t T_INT64
AuthenticationRequest T_THRIFT
Column T_THRIFT
SuperColumn T_THRIFT
ColumnOrSuperColumn T_THRIFT
ColumnParent T_THRIFT
ColumnPath T_THRIFT
SlicePredicate T_THRIFT
MutationMap T_THRIFT
vector<ColumnOrSuperColumn> T_THRIFT
INPUT
T_CASSANDRA
if (sv_derived_from($arg, \"Cassandra\")) {
IV tmp = SvIV((SV*)SvRV($arg));
$var = INT2PTR($type,tmp);
}
else
Perl_croak(aTHX_ \"%s: %s is not of type Cassandra\",
${$ALIAS?\q[GvNAME(CvGV(cv))]:\qq[\"$pname\"]}, \"$var\")
T_INT64
assign_int64($var, $arg)
T_CPPSTRING
assign_string($var, $arg)
T_THRIFT
assign_thrift($var, $arg)
OUTPUT
T_CASSANDRA
sv_setref_pv($arg, \"Cassandra\", (void*)$var);
T_INT64
sv_setint64($arg, $var)
T_CPPSTRING
sv_setpvn_mg($arg, $var.data(), $var.size());
T_THRIFT
sv_setsv($arg, sv_2mortal(thrift_newsv($var)));