New variable.
2000-01-02 Martin Baulig <martin@home-of-linux.org> * c_types.pl ($demarshal_funcs): New variable.
This commit is contained in:
committed by
Martin Baulig
parent
44016ac371
commit
cdfee65492
@@ -1,3 +1,7 @@
|
|||||||
|
2000-01-02 Martin Baulig <martin@home-of-linux.org>
|
||||||
|
|
||||||
|
* c_types.pl ($demarshal_funcs): New variable.
|
||||||
|
|
||||||
1999-11-28 Martin Baulig <martin@home-of-linux.org>
|
1999-11-28 Martin Baulig <martin@home-of-linux.org>
|
||||||
|
|
||||||
* c_types.pl: New file.
|
* c_types.pl: New file.
|
||||||
|
@@ -23,6 +23,23 @@ my $c_marshal_func = sub {
|
|||||||
return $code;
|
return $code;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
my $c_demarshal_func = sub {
|
||||||
|
my ($type, $param, $indent) = @_;
|
||||||
|
|
||||||
|
my $code = '';
|
||||||
|
$code .= sprintf ("%s_LIBGTOP_demarshal_%s = _LIBGTOP_DATA_ptr;\n",
|
||||||
|
$indent, $param);
|
||||||
|
$code .= sprintf ("%sif (_LIBGTOP_TEMP_len) --_LIBGTOP_TEMP_len;\n",
|
||||||
|
$indent);
|
||||||
|
$code .= sprintf ("%s*(_LIBGTOP_DATA_ptr + _LIBGTOP_TEMP_len) = 0;\n",
|
||||||
|
$indent);
|
||||||
|
|
||||||
|
$need_temp_len = 1;
|
||||||
|
|
||||||
|
return $code;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Typeinfo array fields:
|
# Typeinfo array fields:
|
||||||
# ---------------------
|
# ---------------------
|
||||||
@@ -46,4 +63,7 @@ $sizeof_funcs = {'string' => $c_strlen_func,
|
|||||||
$marshal_funcs = {'string' => $c_marshal_func,
|
$marshal_funcs = {'string' => $c_marshal_func,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
$demarshal_funcs = {'string' => $c_demarshal_func,
|
||||||
|
};
|
||||||
|
|
||||||
1;
|
1;
|
||||||
|
Reference in New Issue
Block a user