Inline::C with AUTOWRAP to wrap a C library which uses Perl tools? (perl.h, XSUB.h, EXTERN.h etc)

  Hi all,
  I've encountered some problems and I'm wondering if it's ok to do what
  I'm trying to do: can I use Inline::C with the AUTOWRAP option to call
  a C library whose functions take variables of Perl types?  (the same
  way it would use them if the code were inlined in the perl script)
I mean SV*, HV* etc - the ones in libperl and declared in perl.h,
EXTERN.h etc.
 I've had no errors with compiling and building, at run time I can even
 call some functions that use scalar types (SV*) to receive an "int" as
 argument but if I'm passing a hash reference a segfault happens when
 trying to iterate through the keys in the hash.
  My idea was to be able to pass hashes and other complex types from
  perl to C. So I have a test function in the C library which takes a
  hash reference as a SV*, then converts that to a HV* and starts
  iterating through it (it's taken from the examples in the C CookBook):

-----------------

void dumpHash(SV* hash_ref)
{
         HV* hash;
         HE* hash_entry;
         int num_keys, i;
         SV* sv_key;
         SV* sv_val;


         if (! SvROK(hash_ref))
             croak("hash_ref is not a reference");

         hash = (HV*)SvRV(hash_ref);

         num_keys = hv_iterinit(hash); // <<<<<<<---- segfaults here

         for (i = 0; i < num_keys; i++) {
             hash_entry = hv_iternext(hash);
             sv_key = hv_iterkeysv(hash_entry);
             sv_val = hv_iterval(hash, hash_entry);
             printf("%s => %s\n", SvPV(sv_key, PL_na), SvPV(sv_val,
             PL_na));
         }
         return;

}
-----------------

Then I call the function from a perl script which uses Inline like that:
(the C library "libcperlbindings.a" is built under cstuff/ directory)

-----------------

#!/usr/bin/perl

package CBindings;

use Inline C => Config =>
	ENABLE => AUTOWRAP =>
	LIBS => '-L/root/aaa/perl_inline/cstuff/.libs/ -lcperlbindings',
	INC => '-I/root/aaa/perl_inline/cstuff/';

use Inline C => q{ void dumpHash(SV*); };

package main;


my %hash = (
             Author => "Brian Ingerson",
             Nickname => "INGY",
             Module => "Inline.pm",
             Version => "0.30",
             Language => "C",
           );

CBindings::dumpHash(\$hash); # <<<<<<----- segfaults here

--------------------

When running this it gets a segfault and using a debugger I've noticed
that the call that crashes is the one on the line with "num_keys =
hv_iterinit(hash);" (marked in the source code too)

Can anyone see the problem? Isn't this supposed to work with AUTOWRAP ?
Or am I doing it the wrong way? 
It can iterate just fine if I inline the C function in the Perl script
(without AUTOWRAP).

Any help is greately apreciated, thanks!

Laurentiu
-- 

-- 
http://www.fastmail.fm - Access all of your messages and folders
                          wherever you are

0
coldstone
11/15/2006 1:05:14 PM
perl.inline 1278 articles. 0 followers. Follow

4 Replies
509 Views

Similar Articles

[PageSpeed] 18

   Hi again,
   In fact I've noticed that even if I don't use AUTOWRAP it still 
crashes. I've inlined a small C function in the pel script which simply 
delegates to the function in the library:

use Inline C => <<'END_OF_C_CODE';
  void dumpHash2(SV* hash_ref)
  {
    dumpHash(hash_ref); // this is the function in the C library
  }
END_OF_C_CODE

And it still segfaults in the library, the same as as earlier.
The C code is copied verbatim from the Cookbook. What's different when 
running inside the library? Maybe some mysterious changes that Inline::C 
does to the inlined C code ?

Please help, thanks!

lr



laurentiu r wrote:
>   Hi all,
>   I've encountered some problems and I'm wondering if it's ok to do what
>   I'm trying to do: can I use Inline::C with the AUTOWRAP option to call
>   a C library whose functions take variables of Perl types?  (the same
>   way it would use them if the code were inlined in the perl script)
> I mean SV*, HV* etc - the ones in libperl and declared in perl.h,
> EXTERN.h etc.
>  I've had no errors with compiling and building, at run time I can even
>  call some functions that use scalar types (SV*) to receive an "int" as
>  argument but if I'm passing a hash reference a segfault happens when
>  trying to iterate through the keys in the hash.
>   My idea was to be able to pass hashes and other complex types from
>   perl to C. So I have a test function in the C library which takes a
>   hash reference as a SV*, then converts that to a HV* and starts
>   iterating through it (it's taken from the examples in the C CookBook):
> 
> -----------------
> 
> void dumpHash(SV* hash_ref)
> {
>          HV* hash;
>          HE* hash_entry;
>          int num_keys, i;
>          SV* sv_key;
>          SV* sv_val;
> 
> 
>          if (! SvROK(hash_ref))
>              croak("hash_ref is not a reference");
> 
>          hash = (HV*)SvRV(hash_ref);
> 
>          num_keys = hv_iterinit(hash); // <<<<<<<---- segfaults here
> 
>          for (i = 0; i < num_keys; i++) {
>              hash_entry = hv_iternext(hash);
>              sv_key = hv_iterkeysv(hash_entry);
>              sv_val = hv_iterval(hash, hash_entry);
>              printf("%s => %s\n", SvPV(sv_key, PL_na), SvPV(sv_val,
>              PL_na));
>          }
>          return;
> 
> }
> -----------------
> 
> Then I call the function from a perl script which uses Inline like that:
> (the C library "libcperlbindings.a" is built under cstuff/ directory)
> 
> -----------------
> 
> #!/usr/bin/perl
> 
> package CBindings;
> 
> use Inline C => Config =>
> 	ENABLE => AUTOWRAP =>
> 	LIBS => '-L/root/aaa/perl_inline/cstuff/.libs/ -lcperlbindings',
> 	INC => '-I/root/aaa/perl_inline/cstuff/';
> 
> use Inline C => q{ void dumpHash(SV*); };
> 
> package main;
> 
> 
> my %hash = (
>              Author => "Brian Ingerson",
>              Nickname => "INGY",
>              Module => "Inline.pm",
>              Version => "0.30",
>              Language => "C",
>            );
> 
> CBindings::dumpHash(\$hash); # <<<<<<----- segfaults here
> 
> --------------------
> 
> When running this it gets a segfault and using a debugger I've noticed
> that the call that crashes is the one on the line with "num_keys =
> hv_iterinit(hash);" (marked in the source code too)
> 
> Can anyone see the problem? Isn't this supposed to work with AUTOWRAP ?
> Or am I doing it the wrong way? 
> It can iterate just fine if I inline the C function in the Perl script
> (without AUTOWRAP).
> 
> Any help is greately apreciated, thanks!
> 
> Laurentiu
0
coldstone
11/16/2006 10:53:30 AM
----- Original Message ----- 
From: "laurentiu rudeanu" <coldstone@fastmail.fm>
To: <inline@perl.org>
Sent: Thursday, November 16, 2006 9:53 PM
Subject: Re: Inline::C with AUTOWRAP to wrap a C library which uses Perl
tools?(perl.h, XSUB.h, EXTERN.h etc)


>
>    Hi again,
>    In fact I've noticed that even if I don't use AUTOWRAP it still
> crashes. I've inlined a small C function in the pel script which simply
> delegates to the function in the library:
>
> use Inline C => <<'END_OF_C_CODE';
>   void dumpHash2(SV* hash_ref)
>   {
>     dumpHash(hash_ref); // this is the function in the C library
>   }
> END_OF_C_CODE
>
> And it still segfaults in the library, the same as as earlier.
> The C code is copied verbatim from the Cookbook. What's different when
> running inside the library? Maybe some mysterious changes that Inline::C
> does to the inlined C code ?
>

My cwd is:
D:\pscrpt\inline

plib.c (in the cwd) looks like:
--------------
#include "EXTERN.h"
#include "perl.h"
#include "XSUB.h"

          void dumpHash(SV* hash_ref) {
                HV* hash;
                HE* hash_entry;
                int num_keys, i;
                SV* sv_key;
                SV* sv_val;

                if (! SvROK(hash_ref))
                    croak("hash_ref is not a reference");

                hash = (HV*)SvRV(hash_ref);
                num_keys = hv_iterinit(hash);
                for (i = 0; i < num_keys; i++) {
                    hash_entry = hv_iternext(hash);
                    sv_key = hv_iterkeysv(hash_entry);
                    sv_val = hv_iterval(hash, hash_entry);
                    printf("%s => %s\n", SvPV(sv_key, PL_na), SvPV(sv_val,
PL_na));
                }
                return;
            }

--------------

My perl header files and libperl58.a are in D:\perl58_M\5.8.8\lib\CORE

I build libplib.a in the cwd by first running:
gcc -o plib.o -c plib.c -ID:\perl58_M\5.8.8\lib\CORE
followed by:
ar rc libplib.a plib.o

try.pl (in the cwd) looks like:
---------------
use Inline C => Config =>
    LIBS =>
'-LD:\pscrpt\inline -lplib -LD:\perl58_M\5.8.8\lib\CORE -lperl58',
    BUILD_NOISY => 1; # see the compilation report

use Inline C => <<'END_OF_C_CODE';
  void dumpHash2(SV* hash_ref)
  {
    dumpHash(hash_ref); // this is the function in the C library
  }

END_OF_C_CODE

            my %hash = (
                        Author => "Brian Ingerson",
                        Nickname => "INGY",
                        Module => "Inline.pm",
                        Version => "0.30",
                        Language => "C",
                       );

            dumpHash2(\%hash);
---------------

I run 'perl try.pl' and get the usual compilation output, followed by:
---------------
Version => 0.30
Nickname => INGY
Language => C
Module => Inline.pm
Author => Brian Ingerson
---------------

No problem :-)

Cheers,
Rob

0
sisyphus1
11/16/2006 11:34:20 AM
   Hi Bob,
   Thanks a lot for the reply!
   I was going to abandon the whole Inline thing and look for other 
ways/tools but because you had succeses with your test it made me pick 
it up again and see what's wrong with my code... The problem was really 
stupid and it was all my fault: I was passing \$hash as the parameter 
instead of \%hash... don't ask me why I changed that :) (it's true that 
at some point I was toying with passing various reference arguments)

Good to know it's working so I can still go on with Inline !

Thanks a lot, cheers!
Laurentiu R


Sisyphus wrote:
> ----- Original Message ----- 
> From: "laurentiu rudeanu" <coldstone@fastmail.fm>
> To: <inline@perl.org>
> Sent: Thursday, November 16, 2006 9:53 PM
> Subject: Re: Inline::C with AUTOWRAP to wrap a C library which uses Perl
> tools?(perl.h, XSUB.h, EXTERN.h etc)
> 
> 
> 
>>   Hi again,
>>   In fact I've noticed that even if I don't use AUTOWRAP it still
>>crashes. I've inlined a small C function in the pel script which simply
>>delegates to the function in the library:
>>
>>use Inline C => <<'END_OF_C_CODE';
>>  void dumpHash2(SV* hash_ref)
>>  {
>>    dumpHash(hash_ref); // this is the function in the C library
>>  }
>>END_OF_C_CODE
>>
>>And it still segfaults in the library, the same as as earlier.
>>The C code is copied verbatim from the Cookbook. What's different when
>>running inside the library? Maybe some mysterious changes that Inline::C
>>does to the inlined C code ?
>>
> 
> 
> My cwd is:
> D:\pscrpt\inline
> 
> plib.c (in the cwd) looks like:
> --------------
> #include "EXTERN.h"
> #include "perl.h"
> #include "XSUB.h"
> 
>           void dumpHash(SV* hash_ref) {
>                 HV* hash;
>                 HE* hash_entry;
>                 int num_keys, i;
>                 SV* sv_key;
>                 SV* sv_val;
> 
>                 if (! SvROK(hash_ref))
>                     croak("hash_ref is not a reference");
> 
>                 hash = (HV*)SvRV(hash_ref);
>                 num_keys = hv_iterinit(hash);
>                 for (i = 0; i < num_keys; i++) {
>                     hash_entry = hv_iternext(hash);
>                     sv_key = hv_iterkeysv(hash_entry);
>                     sv_val = hv_iterval(hash, hash_entry);
>                     printf("%s => %s\n", SvPV(sv_key, PL_na), SvPV(sv_val,
> PL_na));
>                 }
>                 return;
>             }
> 
> --------------
> 
> My perl header files and libperl58.a are in D:\perl58_M\5.8.8\lib\CORE
> 
> I build libplib.a in the cwd by first running:
> gcc -o plib.o -c plib.c -ID:\perl58_M\5.8.8\lib\CORE
> followed by:
> ar rc libplib.a plib.o
> 
> try.pl (in the cwd) looks like:
> ---------------
> use Inline C => Config =>
>     LIBS =>
> '-LD:\pscrpt\inline -lplib -LD:\perl58_M\5.8.8\lib\CORE -lperl58',
>     BUILD_NOISY => 1; # see the compilation report
> 
> use Inline C => <<'END_OF_C_CODE';
>   void dumpHash2(SV* hash_ref)
>   {
>     dumpHash(hash_ref); // this is the function in the C library
>   }
> 
> END_OF_C_CODE
> 
>             my %hash = (
>                         Author => "Brian Ingerson",
>                         Nickname => "INGY",
>                         Module => "Inline.pm",
>                         Version => "0.30",
>                         Language => "C",
>                        );
> 
>             dumpHash2(\%hash);
> ---------------
> 
> I run 'perl try.pl' and get the usual compilation output, followed by:
> ---------------
> Version => 0.30
> Nickname => INGY
> Language => C
> Module => Inline.pm
> Author => Brian Ingerson
> ---------------
> 
> No problem :-)
> 
> Cheers,
> Rob
> 
0
coldstone
11/16/2006 2:12:33 PM
Hi Rob,
There was a typo in the previous message. I accidentally called you 
'Bob', sorry about that

All the best,
lr

laurentiu rudeanu wrote:
>   Hi Bob,
>   Thanks a lot for the reply!
>   I was going to abandon the whole Inline thing and look for other 
> ways/tools but because you had succeses with your test it made me pick 
> it up again and see what's wrong with my code... The problem was really 
> stupid and it was all my fault: I was passing \$hash as the parameter 
> instead of \%hash... don't ask me why I changed that :) (it's true that 
> at some point I was toying with passing various reference arguments)
> 
> Good to know it's working so I can still go on with Inline !
> 
> Thanks a lot, cheers!
> Laurentiu R
> 
> 
> Sisyphus wrote:
> 
>> ----- Original Message ----- From: "laurentiu rudeanu" 
>> <coldstone@fastmail.fm>
>> To: <inline@perl.org>
>> Sent: Thursday, November 16, 2006 9:53 PM
>> Subject: Re: Inline::C with AUTOWRAP to wrap a C library which uses Perl
>> tools?(perl.h, XSUB.h, EXTERN.h etc)
>>
>>
>>
>>>   Hi again,
>>>   In fact I've noticed that even if I don't use AUTOWRAP it still
>>> crashes. I've inlined a small C function in the pel script which simply
>>> delegates to the function in the library:
>>>
>>> use Inline C => <<'END_OF_C_CODE';
>>>  void dumpHash2(SV* hash_ref)
>>>  {
>>>    dumpHash(hash_ref); // this is the function in the C library
>>>  }
>>> END_OF_C_CODE
>>>
>>> And it still segfaults in the library, the same as as earlier.
>>> The C code is copied verbatim from the Cookbook. What's different when
>>> running inside the library? Maybe some mysterious changes that Inline::C
>>> does to the inlined C code ?
>>>
>>
>>
>> My cwd is:
>> D:\pscrpt\inline
>>
>> plib.c (in the cwd) looks like:
>> --------------
>> #include "EXTERN.h"
>> #include "perl.h"
>> #include "XSUB.h"
>>
>>           void dumpHash(SV* hash_ref) {
>>                 HV* hash;
>>                 HE* hash_entry;
>>                 int num_keys, i;
>>                 SV* sv_key;
>>                 SV* sv_val;
>>
>>                 if (! SvROK(hash_ref))
>>                     croak("hash_ref is not a reference");
>>
>>                 hash = (HV*)SvRV(hash_ref);
>>                 num_keys = hv_iterinit(hash);
>>                 for (i = 0; i < num_keys; i++) {
>>                     hash_entry = hv_iternext(hash);
>>                     sv_key = hv_iterkeysv(hash_entry);
>>                     sv_val = hv_iterval(hash, hash_entry);
>>                     printf("%s => %s\n", SvPV(sv_key, PL_na), 
>> SvPV(sv_val,
>> PL_na));
>>                 }
>>                 return;
>>             }
>>
>> --------------
>>
>> My perl header files and libperl58.a are in D:\perl58_M\5.8.8\lib\CORE
>>
>> I build libplib.a in the cwd by first running:
>> gcc -o plib.o -c plib.c -ID:\perl58_M\5.8.8\lib\CORE
>> followed by:
>> ar rc libplib.a plib.o
>>
>> try.pl (in the cwd) looks like:
>> ---------------
>> use Inline C => Config =>
>>     LIBS =>
>> '-LD:\pscrpt\inline -lplib -LD:\perl58_M\5.8.8\lib\CORE -lperl58',
>>     BUILD_NOISY => 1; # see the compilation report
>>
>> use Inline C => <<'END_OF_C_CODE';
>>   void dumpHash2(SV* hash_ref)
>>   {
>>     dumpHash(hash_ref); // this is the function in the C library
>>   }
>>
>> END_OF_C_CODE
>>
>>             my %hash = (
>>                         Author => "Brian Ingerson",
>>                         Nickname => "INGY",
>>                         Module => "Inline.pm",
>>                         Version => "0.30",
>>                         Language => "C",
>>                        );
>>
>>             dumpHash2(\%hash);
>> ---------------
>>
>> I run 'perl try.pl' and get the usual compilation output, followed by:
>> ---------------
>> Version => 0.30
>> Nickname => INGY
>> Language => C
>> Module => Inline.pm
>> Author => Brian Ingerson
>> ---------------
>>
>> No problem :-)
>>
>> Cheers,
>> Rob
>>
0
coldstone
11/16/2006 4:11:04 PM
Reply:

Similar Artilces:

Should inline.h be renamed inline.c ?
porting/args_assert.t only looks for .c files. If a function is placed into inline.h which has such assertions, args_assert.t won't find them, and fails. We could add a special case into args_assert.t for inline.h, or we could rename inline.h to be inline.c. The other header files that contain inline functions have a .c suffix already, such as dquote_static.c Karl Williamson wrote: > porting/args_assert.t only looks for .c files. If a function is placed > into inline.h which has such assertions, args_assert.t won't find them, > and fails. > > We...

using jsdjava.c jsdjava.h jre.h in SpiderMonkey
I'm Complete new to spidermonkey but I have to do this Can I integration Java API load the java package in Spidermonkey so that I can use "java.net.URL" ( and various java class at runtime) for loading external web page by setting window.location(defined env- rhino.js) to any given value.Looking through the source code I discover this these files jsdjava.c, jre.c wonder if I can use this for more my purpose for calling specific java API or load the java package in SpiderMonkey If not then please let me know how else can I achieve the same in SpiderMonkey .Rhino is not...

Using Inline::C and Tie for nested data structures (Ho(H)* & friends)
Hello: Forgive the geeky regular expression :) I have been playing around with Inline to deal with a problem which is beyond the scope of Perl. We have files that are extremely large, so using Perl for parsing utilizing Parse::Yapp or similar is just not going to cut it. So, we have this nice parser written in C. The main problem is finding a method to coerce the data into something Perl can read. XS was a little daunting. Inline was out there, but I hadn't tried it. As a quick solution, I wrote something that barfed out a data structure ala Data::Dumper. Then the user...

Steve - H A I L T O T H E H A C K E R S ! !
Hackers - scum of the earth! Parasites on all aspects of life: government, business, my family's computers, my friends' computers, my computer, and your computers. All hackers should be locked up for life by the FBI (even if the damage is less than $5,000)! Ok, if this were the case, we would live in a blissful digital age. Right? Everything running smoothly. Until say Libya, Syria, North Korea, or whoever decides that they do not like what "Perfect" America is doing and declares war on us. Then what? Sense our hated hackers all are in jail and all of our sof...

Inline::C and Inline::C::Struct question
Hi, I have installed the Inline::C (0.43) and Inline::Struct (0.06) and I still can't run the example code that contains a struct. Is there something I am missing, like a ENV variable not set or something foolish like that? I pretty much gave up on using structs directly from Perl, but I can't even define/create an instance of one from whithin the inline C call. It however works if I have an include file. So here is the code that works: PL -- #!/usr/bin/perl use Inline C => << 'ENDING'; #include<other.c> void geta(int aa) { in...

superreview granted: [Bug 407297] nsIHTMLToTextSink should use nsStringGlue .h instead of nsString.h : [Attachment 292018] Changes nsString. h to nsStringGlue.h in nsIHTMLToTextSink
Boris Zbarsky (reviews very slow until spring) <bzbarsky@mit.edu> has granted superreview: Bug 407297: nsIHTMLToTextSink should use nsStringGlue.h instead of nsString.h https://bugzilla.mozilla.org/show_bug.cgi?id=407297 Attachment 292018: Changes nsString.h to nsStringGlue.h in nsIHTMLToTextSink https://bugzilla.mozilla.org/attachment.cgi?id=292018&action=edit ------- Additional Comments from Boris Zbarsky (reviews very slow until spring) <bzbarsky@mit.edu> This should hopefully be a safe change that allows mailnews to move forward. ...

Anyone used Inline::C to pass mxArrays to C shared libraries crea ted by Matlab?
Hi All, I am passing an array reference to an Inline C function in the form of SV* and from there I am trying to pass a mxArray variable which points to the contents of SV*. Does anyone happen to know how to convert a SV* to a mxArray? Thanks... Brady Cannon ...

superreview requested: [Bug 451554] C++ inline comments have crept into SeaMonkeys prefwindow.xml : [Attachment 334894] Use XML comments instead of C++ inline comments
Philip Chee <philip.chee@gmail.com> has asked Karsten D=C3=BCsterloh <mnyromyr@tprac.de> for superreview: Bug 451554: C++ inline comments have crept into SeaMonkeys prefwindow.xml https://bugzilla.mozilla.org/show_bug.cgi?id=3D451554 Attachment 334894: Use XML comments instead of C++ inline comments https://bugzilla.mozilla.org/attachment.cgi?id=3D334894&action=3Dedit ------- Additional Comments from Philip Chee <philip.chee@gmail.com> Fixes comment nit.= ...

superreview canceled: [Bug 451554] C++ inline comments have crept into SeaMonkeys prefwindow.xml : [Attachment 334894] Use XML comments instead of C++ inline comments
Karsten D=C3=BCsterloh <mnyromyr@tprac.de> has canceled Philip Chee <philip.chee@gmail.com>'s request for superreview: Bug 451554: C++ inline comments have crept into SeaMonkeys prefwindow.xml https://bugzilla.mozilla.org/show_bug.cgi?id=3D451554 Attachment 334894: Use XML comments instead of C++ inline comments https://bugzilla.mozilla.org/attachment.cgi?id=3D334894&action=3Dedit ------- Additional Comments from Karsten D=C3=BCsterloh <mnyromyr@tprac.de> Landed on trunk.= ...

superreview requested: [Bug 247406] secport.h has PORT_Strdup in C++ unsafe section : [Attachment 151062] move PORT_Strdup to extern "C" section
Julien Pierre <julien.pierre.bugs@sun.com> has asked Wan-Teh Chang <wchang0222@aol.com> for superreview: Bug 247406: secport.h has PORT_Strdup in C++ unsafe section http://bugzilla.mozilla.org/show_bug.cgi?id=247406 Attachment 151062: move PORT_Strdup to extern "C" section http://bugzilla.mozilla.org/attachment.cgi?id=151062&action=edit ...

superreview denied: [Bug 247406] secport.h has PORT_Strdup in C++ unsafe section : [Attachment 151062] move PORT_Strdup to extern "C" section
Wan-Teh Chang <wchang0222@aol.com> has denied Julien Pierre <julien.pierre.bugs@sun.com>'s request for superreview: Bug 247406: secport.h has PORT_Strdup in C++ unsafe section http://bugzilla.mozilla.org/show_bug.cgi?id=247406 Attachment 151062: move PORT_Strdup to extern "C" section http://bugzilla.mozilla.org/attachment.cgi?id=151062&action=edit ------- Additional Comments from Wan-Teh Chang <wchang0222@aol.com> Julien, please also remove the line: #define PORT_Strdup XP_STRDUP or the whole #ifdef XP_STRING_FUNCS block. This is to prevent...

\h not equiv to [\h]
--14dae9399ce7b16a6104c544c4c1 Content-Type: text/plain; charset=ISO-8859-1 Hi, Is this a known bug? $ perl -le'print "\xA0" =~ /\p{Space}/ ?1:0' 1 $ perl -le'print "\xA0" =~ /\s/ ?1:0' 0 $ perl -le'print "\xA0" =~ /\s/u ?1:0' 1 __ $ perl -le'print "\xA0" =~ /\h/ ?1:0' \ 1 \ > huh?? $ perl -le'print "\xA0" =~...

Linux sqlcli.h, sqlcli1.h and sqlext.h
--=_alternative 004E7DFF85256E32_= Content-Type: text/plain; charset="US-ASCII" Hi, I am trying to install the DB2 DBD driver to write Perl scripts for querying a DB2 database. I was able to build the DBI and the test.pl was successful. But when I tried to compile the driver I got this message: Constants.xs:16:20: sqlcli.h: No such file or directory Constants.xs:16:20: sqlcli1.h: No such file or directory Constants.xs:16:20: sqlext.h: No such file or directory make[1]: *** [Constants.o] Error 1 Can you please let me know where I can download these .h files from? ...

superreview granted: [Bug 247406] secport.h has PORT_Strdup in C++ unsafe section : [Attachment 151068] move PORT_Strdup to extern "C" section; remove XP_STRING_FUNCS section
Julien Pierre <julien.pierre.bugs@sun.com> has granted Wan-Teh Chang <wchang0222@aol.com>'s request for superreview: Bug 247406: secport.h has PORT_Strdup in C++ unsafe section http://bugzilla.mozilla.org/show_bug.cgi?id=247406 Attachment 151068: move PORT_Strdup to extern "C" section; remove XP_STRING_FUNCS section http://bugzilla.mozilla.org/attachment.cgi?id=151068&action=edit ------- Additional Comments from Julien Pierre <julien.pierre.bugs@sun.com> Looks good. ...

superreview requested: [Bug 247406] secport.h has PORT_Strdup in C++ unsafe section : [Attachment 151068] move PORT_Strdup to extern "C" section; remove XP_STRING_FUNCS section
Wan-Teh Chang <wchang0222@aol.com> has asked Julien Pierre <julien.pierre.bugs@sun.com> for superreview: Bug 247406: secport.h has PORT_Strdup in C++ unsafe section http://bugzilla.mozilla.org/show_bug.cgi?id=247406 Attachment 151068: move PORT_Strdup to extern "C" section; remove XP_STRING_FUNCS section http://bugzilla.mozilla.org/attachment.cgi?id=151068&action=edit ...

Web resources about - Inline::C with AUTOWRAP to wrap a C library which uses Perl tools? (perl.h, XSUB.h, EXTERN.h etc) - perl.inline

Resources last updated: 11/28/2015 10:17:58 PM