Re: Transparent packed C arrays
- From: Ilya Zakharevich <nospam-abuse@xxxxxxxxx>
- Date: Wed, 23 Nov 2005 02:17:25 +0000 (UTC)
[A complimentary Cc of this posting was sent to
Tassilo v. Parseval
<tassilo.von.parseval@xxxxxxxxxxxxxx>], who wrote in article <3ufq31F10ag49U1@xxxxxxxxxxxxxx>:
> > I need something more Perlish, like
> >
> > my $obj = ToPerl 'L*', pack 'L*', @vec;
> > print $obj->[170];
> > $obj *= 5;
> >
> > $obj = $obj + $obj * $obj;
>
> Is it perhaps Convert::Binary::C that you were looking for?
Convert::Binary::C is a preprocessor and parser for C type definitions.
??? What could be a relation?
> I don't think it has that kind of
> overloading you asked for but it's easy to write your own wrapper module
> with the help of C::B::C.
The module should define (several?) hundred functions. Never a simple
job to start from scratch.
BTW, in my examples above I want something like pack('L!*'), not
pack('L*') - so that native arithmetic can be used for overloaded
operations.
Thanks,
Ilya
.
- References:
- Transparent packed C arrays
- From: Ilya Zakharevich
- Re: Transparent packed C arrays
- From: ~greg
- Re: Transparent packed C arrays
- From: Ilya Zakharevich
- Re: Transparent packed C arrays
- From: Tassilo v. Parseval
- Transparent packed C arrays
- Prev by Date: ANNOUNCE: Win32::GUI V1.03 Released
- Next by Date: Re: Transparent packed C arrays
- Previous by thread: Re: Transparent packed C arrays
- Next by thread: Sample script to remove line breaks in a XML file
- Index(es):