Git Product home page Git Product logo

cookbookb's Introduction

CookBookB - Dean's Extension-Building Cookbook, part B.

These are the same examples you've seen posted to comp.lang.perl.misc in
late '95 and early '96.  All of them are about letting Perl manipulate C
structures or C++ objects.

Struct1: A very simple example showing how Perl can create, manipulate, and
	destroy a C structure.

Opaque: Another simple example of letting Perl create, manipulate, and
	destroy a C structure.  I think I named it Opaque because I was
	trying to emphasize that the simplest way to do this is to allow the
	C object to be opaque to Perl.

ListOfStruct: An example of letting Perl manipulate a linked list of C
	structures.

ArrayOfStruct: An example of letting Perl manipulate an array of C
	structures.

CCsimple: A very simple example showing how Perl can create, manipulate,
	and destroy a C++ object.

Struct2: This is the Struct1 example using typemaps which convert the C
	structure to and from a Perl array.  This is "the hard way"; Struct1
	and Opaque are "the easy way".

Struct3: This is the Struct1 example using typemaps which convert the C
	structure to and from a Perl hash.  This is "the hard way"; Struct1
	and Opaque are "the easy way".

Mstruct: This shows C-like interfaces to some C functions which take
	pointers to C structs.  I do not recommend using this non-Perl style.

Most examples contain NOTES files which describe how they were created.

Some of these examples rely on my perlobject.map typemap, which is included
in the package and can also be found on CPAN in the same place you found
this package.

If you are going to do datatype conversions between C and Perl, which is
what XS programming is all about, then you would be doing yourself a favor
to install Devel::Peek and to learn how to use its Dump() function.  The
DevelPeek.pod document in this package is a preliminary manpage/tutorial.

For other examples of extension-building, covering a wider range of
mini-topics, consult the CookBookA package, which is part A of this
Extension-Building CookBook series.  CookBookA can be found on CPAN in the
same place you found this CookBookB package.

Dean Roehrich
apr 30,96

------------------
apr 30,96 additions:
 - Added Mstruct
 - Added DevelPeek.pod
 - Added notes about CookBookA

cookbookb's People

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.