Hi all,

In a c++ class, there is a static object. I'd like to wrap it as a sub in perlxs. Just like this:

foo *
foo::bar()
CODE:
         RETVAL = &(foo::bar);
OUTPUT:
         RETVAL

Of course, the RETVAL will be blessed in typemap and finally return a RV in perl code.
Each time I invoke the sub in perl, it will cause a segfault. But the same idea works in c++ code.
Does anyone know the reason? Thanks in advance.

--
Bst Rgrs, Dongxu

Reply via email to