| List: | NDB Connectors | « Previous MessageNext Message » | |
| From: | Mika Raento | Date: | May 8 2007 8:58am |
| Subject: | Re: [Fwd: Re: [Swig-user] C++ wrapping question] | ||
| View as plain text | |||
So the following added to the top of perl_extend_ndbtransaction_async.i
extends the lifetime of the transaction to cover the callback:
%feature("shadow") executeAsynchPrepare(ExecType execType,
SV* pFcn,
AbortOption abortOption = AbortOnError)
%{
sub executeAsynchPrepare {
my $self=shift;
my $exec=shift;
my $sub=shift;
my $abort=shift;
mysql::cluster::ndbapic::NdbTransaction_executeAsynchPrepare($self, $exec,
sub { $sub->(); $self; }, $abort);
}
%}
(the crucial bit being the $self; added to the anon sub).
Mika
| Thread | ||
|---|---|---|
| • [Fwd: Re: [Swig-user] C++ wrapping question] | Monty Taylor | 7 May |
| • Re: [Fwd: Re: [Swig-user] C++ wrapping question] | Mika Raento | 8 May |
| • Re: [Fwd: Re: [Swig-user] C++ wrapping question] | Monty Taylor | 8 May |
| • Re: [Fwd: Re: [Swig-user] C++ wrapping question] | Mika Raento | 8 May |
| • Re: [Fwd: Re: [Swig-user] C++ wrapping question] | Monty Taylor | 8 May |
| • Re: [Fwd: Re: [Swig-user] C++ wrapping question] | Mika Raento | 8 May |
| • Re: [Fwd: Re: [Swig-user] C++ wrapping question] | Mika Raento | 8 May |
| • Re: [Fwd: Re: [Swig-user] C++ wrapping question] | Mika Raento | 8 May |
| • compilation fails from bzr | Mika Raento | 8 May |
| • Re: compilation fails from bzr | Monty Taylor | 8 May |
