Re: Inheritance

2010-04-17 Thread Steffen Mueller
Hi Pat, Pat Dupre wrote: I created a C++ class by using XS. Every things OK. Now I want to derive a class from it. How can I do it ? Maybe I'm misunderstanding you, but it should be simple. If you have the base Perl class 'Base' that wraps methods in the C++ base class 'BaseCpp' (separate

Re: Problem with SWIG under 64-bit arch

2010-10-01 Thread Steffen Mueller
Hi, menth0l wrote: I wrote a small module with C++ for computing similiarity between strings. I compiled it on my 32-bit Windows XP machine using MinGW and SWIG and got a .dll file. It worked like a charm. Now i need to make it work in Windows 2003 x86_64 envinronment. I downloaded 64-bit

Re: XS C++ return class pointers

2011-04-09 Thread Steffen Mueller
Hi James, while I have a fair amount of experience with wrapping C++ using XS, it's one of those things I have to relearn almost every time I use it. On 04/09/2011 08:25 AM, James Shirley wrote: Hi, I'm trying to write a XS routine to return a point to a c++ class to be accessible from

Re: error: reference to 'group' is ambiguous

2011-10-14 Thread Steffen Mueller
On 10/14/2011 08:18 AM, Jeffrey Ratcliffe wrote: I'm getting this error wrapping a C++ library: Group.c: In function 'void XS_Foo__Group_new(PerlInterpreter*, CV*)': Group.c:84: error: reference to 'group' is ambiguous /usr/include/grp.h:44: error: candidates are: struct group group.h:41:

Re: Throwing exceptions from XS code

2011-10-26 Thread Steffen Mueller
On 10/26/2011 09:11 PM, Emmanuel Rodriguez wrote: Is it possible to throw an blessed exception from XS code? If so how can I achieve this? Otherwise, how can I propagate an error as a string and free the string? Haven't tried myself, but: Set $@ yourself and then croak(NULL). From

Re: Throwing exceptions from XS code

2011-10-27 Thread Steffen Mueller
On Wed, Oct 26, 2011 at 22:02, Steffen Mueller smuel...@cpan.org wrote: It works, at least no crashes so far :) Another question: since I'm returning now the sv exception_object, do you know if I have to call sv_2mortal() on it? You're not returning it, but assigning it to $@, which I

Re: XS for C++

2012-01-01 Thread Steffen Mueller
On 12/30/2011 10:22 AM, Shlomi Fish wrote: On Thu, 29 Dec 2011 22:13:37 + Alberto Simõesal...@alfarrabio.di.uminho.pt wrote: I am used to write XS code (well, simple code) for C libraries. I never did anything for C++ (and I do not know much about C++), but I'll need to write a simple

Re: Pam Perl or call for brave souls

2012-01-01 Thread Steffen Mueller
Hi Ben, thanks for sharing. On 12/29/2011 01:21 AM, ben wrote: Announcing... (Drum roll, please) the first publicly available version of libPam_Perl: 0.001 codename theoretically functional. I have not yet registered the namespace and I'm still tweaking the handling of constants but it