Linux SoftwareProgrammingLibrariesInline::C 0.44

Inline::C 0.44


Inline::C is a Perl module that can Write Perl Subroutines in C. Inline::C is a module that allows you to write Perl subroutines i
Developer:   Brian Ingerson
      more software by author →
Price:  0.00
License:   Perl Artistic License
File size:   89K
Language:   
OS:   
Rating:   0 /5 (0 votes)
Your vote:  
enlarge screenshot


Inline::C is a Perl module that can Write Perl Subroutines in C.

Inline::C is a module that allows you to write Perl subroutines in C. Since version 0.30 the Inline module supports multiple programming languages and each language has its own support module. This document describes how to use Inline with the C programming language. It also goes a bit into Perl C internals.

If you want to start working with programming examples right away, check out Inline::C-Cookbook. For more information on Inline in general, see Inline.

Usage

You never actually use Inline::C directly. It is just a support module for using Inline.pm with C. So the usage is always:
use Inline C => ...;
or
bind Inline C => ...;

Function Definitions

The Inline grammar for C recognizes certain function definitions (or signatures) in your C code. If a signature is recognized by Inline, then it will be available in Perl-space. That is, Inline will generate the "glue" necessary to call that function as if it were a Perl subroutine. If the signature is not recognized, Inline will simply ignore it, with no complaints. It will not be available from Perl-space, although it will be available from C-space.

Inline looks for ANSI/prototype style function definitions. They must be of the form:

return-type function-name ( type-name-pairs ) { ... }

The most common types are: int, long, double, char*, and SV*. But you can use any type for which Inline can find a typemap. Inline uses the typemap file distributed with Perl as the default. You can specify more typemaps with the TYPEMAPS configuration option.

A return type of void may also be used. The following are examples of valid function definitions.

int Foo(double num, char* str) {
void Foo(double num, char* str) {
SV* Foo() {
void Foo(SV*, ...) {
long Foo(int i, int j, ...) {

The following definitions would not be recognized:

Foo(int i) { # no return type
int Foo(float f) { # no (default) typemap for float
int Foo(num, str) double num; char* str; {
void Foo(void) { # void only valid for return type

Notice that Inline only looks for function definitions, not function prototypes. Definitions are the syntax directly preceeding a function body. Also Inline does not scan external files, like headers. Only the code passed to Inline is used to create bindings; although other libraries can linked in, and called from C-space.

Requirements:
  • Perl
    tags function definitions  return type  double num  int foo  use inline  num char*  void foo  char* str  you can  the following  foo double  foo int  available from  

    Download Inline::C 0.44


     http://mirrors.evolva.ro/CPAN/authors/id/I/IN/INGY/Inline-0.44.tar.gz


    Authors software

    Test::Chunks 0.39 (by Brian Ingerson)
    Test::Chunks is a Data Driven Testing Framework.

    NOTE - This module has been deprecated and replaced by Test::Base

    Inline::C 0.44 (by Brian Ingerson)
    Inline::C is a Perl module that can Write Perl Subroutines in C.

    Inline::C is a module that allows you to write Perl subroutines i

    Inline::CPR 0.12 (by Brian Ingerson)
    Inline::CPR is C Perl Run


    Similar software

    Inline::C 0.44 (by Brian Ingerson)
    Inline::C is a Perl module that can Write Perl Subroutines in C.

    Inline::C is a module that allows you to write Perl subroutines i

    Inline::Struct 0.06 (by Neil Watkiss)
    Inline::Struct is a Perl module that manipulate C structures directly from Perl.

    SYNOPSIS

    use Inline C => Config => Structs =

    Inline::CPP 0.25 (by Neil Watkiss)
    Inline::CPP is a Perl module that can write Perl subroutines and classes in C++.

    SYNOPSIS

    use Inline CPP;

    print "9 + 1

    Inline::CPR 0.12 (by Brian Ingerson)
    Inline::CPR is C Perl Run

    Inline::SLang::Changes 1.00 (by Doug Burke)
    Inline::SLang::Changes is a Perl module with changes to previous versions of the module.

    Inline::SLang lets you write Perl subrout

    MKDoc::Text::Structured::Inline 0.83 (by MKDoc::Text::Structured::Inline Team)

    RubyInline 3.2.1 (by zenspider)
    Ruby Inline is an analog to Perl's Inline::C

    genproto 0.4.1 (by Freek)
    genproto generates prototypes from C/C++ code

    FreeBASIC Compiler 0.17b (by Andre Victor)

    issPolicy 1.01 (by Kris Philipsen)


    Other software in this category

    zlib 1.2.3 (by Jean-loup Gailly)
    zlib is designed to be a free, general-purpose, legally unencumbered, lossless data-compression library for use on virtually any comp

    libjpeg v6b (by Independent JPEG Group)
    libjpeg is a library for handling the JPEG (JFIF) image format

    OpenSSL 0.9.7c (by The OpenSSL Project Team)
    The OpenSSL Project is a collaborative effort to develop a robust, commercial-grade, full-featured, and Open Source toolkit implement

    libxml2 2.6.27 (by DV)
    Libxml2 is the XML C parser and toolkit developed for the Gnome project (but usable outside of the Gnome platform), libxml2 library i

    GNU C library 2.4 (by Andreas Jaeger)
    GNU C library (glibc) is one of the most important components of GNU Hurd and most modern Linux distributions.

    GNU C library is us

  •     search


    Featured Software

    jEdit 4.3 pre8
    jEdit is an Open Source text editor written in Java

    Opera 9.02
    Surf the Internet in a safer, faster, and easier way with Opera browser

    GNU Aspell 0.60.4
    GNU Aspell is a Free and Open Source spell checker designed to eventually replace Ispell


    Subscribe in Rojo
    Google Reader
    Add to My Yahoo!

    Add to My AOL
    Subscribe with Bloglines
    Subscribe in NewsGator Online
    Add 'nixbit linux software' to Newsburst from CNET News.com
    del.icio.us nixbit linux software


    Top tags