diff options
author | Martin Baulig <martin@home-of-linux.org> | 2000-01-02 14:51:54 +0000 |
---|---|---|
committer | Martin Baulig <martin@src.gnome.org> | 2000-01-02 14:51:54 +0000 |
commit | cdfee65492c5328682844dfd1cff87c80ef24a07 (patch) | |
tree | 4855b0a5c485483497f4b37a1cb956d4403b9c18 /scripts | |
parent | 44016ac37172e9042e74236bfafcecd9ae531427 (diff) | |
download | libgtop-cdfee65492c5328682844dfd1cff87c80ef24a07.tar.gz |
New variable.
2000-01-02 Martin Baulig <martin@home-of-linux.org>
* c_types.pl ($demarshal_funcs): New variable.
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/ChangeLog | 4 | ||||
-rw-r--r-- | scripts/c_types.pl | 20 |
2 files changed, 24 insertions, 0 deletions
diff --git a/scripts/ChangeLog b/scripts/ChangeLog index b3f9673d..d7e3d033 100644 --- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -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> * c_types.pl: New file. diff --git a/scripts/c_types.pl b/scripts/c_types.pl index 49a1923a..bd568efe 100644 --- a/scripts/c_types.pl +++ b/scripts/c_types.pl @@ -23,6 +23,23 @@ my $c_marshal_func = sub { 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: # --------------------- @@ -46,4 +63,7 @@ $sizeof_funcs = {'string' => $c_strlen_func, $marshal_funcs = {'string' => $c_marshal_func, }; +$demarshal_funcs = {'string' => $c_demarshal_func, + }; + 1; |