Inline::Struct

Inline::Struct is a Perl module that manipulate C structures directly from Perl.
Download

Inline::Struct Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Neil Watkiss
  • Publisher web site:
  • http://search.cpan.org/~neilw/Inline-ASM-0.03/ASM.pod

Inline::Struct Tags


Inline::Struct Description

Inline::Struct is a Perl module that manipulate C structures directly from Perl. Inline::Struct is a Perl module that manipulate C structures directly from Perl.SYNOPSIS use Inline C => Config => Structs => ; my $obj = Inline::Struct::Foo->new; $obj->num(10); $obj->str("Hello"); myfunc($obj); __END__ __C__ struct Foo { int num; char *str; }; void myfunc(Foo *f) { printf("myfunc: num=%i, str='%s'n", f->num, f->str); }This complete program prints: myfunc: num=10, str='Hello'Inline::Struct is not a new language. It's a language extension designed to be used by Inline::C. It parses struct definitions and creates typemaps and XS code which bind each struct into a Perl class. This code is passed to Inline::C, which compiles it in the normal way.NOTE: Inline::Struct parses only C-style structs. It doesn't know about any C++ extensions to structs like scopes, constructors or methods. If you want such functionality you should use Inline::CPP to parse your structs.Requirements:· Perl Requirements: · Perl


Inline::Struct Related Software