RE: Used only once in Perl 5.10

2008-04-28 Thread Jan Dubois
On Mon, 28 Apr 2008, Nicholas Clark wrote: > On Mon, Apr 28, 2008 at 11:50:37PM +0100, Nicholas Clark wrote: > > On Mon, Apr 28, 2008 at 03:48:35PM -0700, Jan Dubois wrote: > > > > > Use the GV_ADDMULTI flag: > > > > > > if (sv = get_sv("Win32::SqlServer::Version", TRUE | GV_ADDMULTI)) > >

Re: Used only once in Perl 5.10

2008-04-28 Thread Nicholas Clark
On Mon, Apr 28, 2008 at 11:50:37PM +0100, Nicholas Clark wrote: > On Mon, Apr 28, 2008 at 03:48:35PM -0700, Jan Dubois wrote: > > > Use the GV_ADDMULTI flag: > > > > if (sv = get_sv("Win32::SqlServer::Version", TRUE | GV_ADDMULTI)) > > Really that should be > > if (sv = get_sv("

Re: Used only once in Perl 5.10

2008-04-28 Thread Nicholas Clark
On Mon, Apr 28, 2008 at 03:48:35PM -0700, Jan Dubois wrote: > Use the GV_ADDMULTI flag: > > if (sv = get_sv("Win32::SqlServer::Version", TRUE | GV_ADDMULTI)) Really that should be if (sv = get_sv("Win32::SqlServer::Version", GV_ADD | GV_ADDMULTI)) The flags to get_sv() were alw

RE: Used only once in Perl 5.10

2008-04-28 Thread Jan Dubois
On Mon, 28 Apr 2008, Erland Sommarskog wrote: > > I have this piece of code in my XS module: > > if (sv = get_sv("Win32::SqlServer::Version", TRUE)) > { >char buff[256]; >sprintf_s(buff, 256, > "This is Win32::SqlServer, version %s\n\nCopyr

Used only once in Perl 5.10

2008-04-28 Thread Erland Sommarskog
I have this piece of code in my XS module: if (sv = get_sv("Win32::SqlServer::Version", TRUE)) { char buff[256]; sprintf_s(buff, 256, "This is Win32::SqlServer, version %s\n\nCopyright (c) 2005-2008 Erland Sommarskog\n",

RE: perl extension statically linked - xsub not called

2008-04-28 Thread Jan Dubois
On Mon, 28 Apr 2008, [EMAIL PROTECTED] wrote: > On Apr 28, 12:49 pm, [EMAIL PROTECTED] (Jan Dubois) wrote: > > If you are using the mechanism from win32/Makefile, then you must make sure > > you add your extension to the list in STATIC_EXT to make sure it gets > > initialized properly.  Otherwise y

Re: perl extension statically linked - xsub not called

2008-04-28 Thread manojkbhatti
On Apr 28, 12:49 pm, [EMAIL PROTECTED] (Jan Dubois) wrote: > If you are using the mechanism from win32/Makefile, then you must make sure > you add your extension to the list in STATIC_EXT to make sure it gets > initialized properly.  Otherwise you need to add some code to your > xs_init() function

RE: perl extension statically linked - xsub not called

2008-04-28 Thread Jan Dubois
On Sun, 27 Apr 2008, [EMAIL PROTECTED] wrote: > I'm developing an app that is embedding perl for some web scarping. I > developed an perl extension that has to callback into my C++ code > while running inside embedded interpreter. If I dynamically link the > perl extension as a .dll then the xsub i

perl extension statically linked - xsub not called

2008-04-28 Thread manojkbhatti
Hello, Perl XS guys please provide some insight n advice I'm developing an app that is embedding perl for some web scarping. I developed an perl extension that has to callback into my C++ code while running inside embedded interpreter. If I dynamically link the perl extension as a .dll then