-
Notifications
You must be signed in to change notification settings - Fork 560
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
blessed object lost in anon sub from 'C' call #3129
Comments
From madison@transmeta.comI have a bug that I managed to isolate to these conditions: 1) C code starts a perl interpretor that blesses an object Depending on where and how the blessed object was referred to in For example, if the blessed variable isn't mentioned except in If you just refer to it, then it won't get lost, and sometimes this I tried to run it on perl 5.6.0, but my 5.6 is threaded, and Here's the tar of my makefile, the C code and the perl code begin 640 foo.tz.uu Perl Info
|
From @HugmeirOn Tue Jan 16 06:25:59 2001, madison@transmeta.com wrote:
libc6:/usr/local/bin:/usr/local/contrib/bin:/bin:/usr/bin:/usr/X11R6/bin
libc6/bin:/cad/polaris/current/exe:/cad/innologic/current/scripts:/cad/s
I think that this was solved somewhere along the road: I get the same thing when commenting the line indicated in foo.pl. But I |
From @bulk88On Mon May 21 18:52:35 2012, Hugmeir wrote:
Ditto. Close it. Attaching my fixes of main.cc to work on a modern perl. -- |
From @bulk88#include <EXTERN.h>
#include <perl.h>
#include <stdio.h>
// --------------------------------------------------
// Perl setup
// --------------------------------------------------
static PerlInterpreter *PERL;
start_perl(char *script) {
char *args[] = {"",script};
// setup the perl object and read in the script
PERL = perl_alloc();
perl_construct(PERL);
perl_parse(PERL, NULL, 3, args, NULL);
perl_run(PERL);
}
end_perl() {
perl_destruct(PERL);
perl_free(PERL);
}
do_call() {
dTHX;
// Perl juju magick:
dSP;
PUSHMARK(sp);
perl_call_pv("call", G_DISCARD|G_NOARGS);
}
// --------------------------------------------------
// Test code
// --------------------------------------------------
int main(int argc, char **argv, char **envp) {
PERL_SYS_INIT3(&argc,&argv,NULL);
start_perl("foo.pl");
do_call();
do_call();
do_call();
do_call();
do_call();
do_call();
end_perl();
PERL_SYS_TERM();
exit(1);
}
|
@iabyn - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#5198 (status was 'resolved')
Searchable as RT5198$
The text was updated successfully, but these errors were encountered: