1 ###################################################
2 # C utility functions for pidl
3 # Copyright jelmer@samba.org 2005-2007
4 # released under the GNU GPL
5 package Parse
::Pidl
::CUtil
;
9 @EXPORT = qw(get_pointer_to get_value_of get_array_element);
10 use vars
qw($VERSION);
19 if ($var_name =~ /^\*(.*)$/) {
21 } elsif ($var_name =~ /^\&(.*)$/) {
22 return "&($var_name)";
32 if ($var_name =~ /^\&(.*)$/) {
39 sub get_array_element($$)
41 my ($var_name, $idx) = @_;
43 if ($var_name =~ /^\*.*$/) {
44 $var_name = "($var_name)";
45 } elsif ($var_name =~ /^\&.*$/) {
46 $var_name = "($var_name)";
49 return "$var_name"."[$idx]";