Newsgroup: comp.lang.perl


Path: doc.ic.ac.uk!dds
From: dds@doc.ic.ac.uk (Diomidis Spinellis)
Newsgroups: comp.lang.perl
Subject: Calling perl from C: sp value?
Date: 21 Sep 1993 18:12:42 GMT
Organization: Dept of Computing, Imperial College, England
Lines: 22
Distribution: world
Message-ID: <27ng6q$gld@frigate.doc.ic.ac.uk>
NNTP-Posting-Host: scorch.doc.ic.ac.uk
Summary: What is the right stack pointer value
Keywords: perl C callback
Content-Length: 1011
I want to be able to write C callback routines in Perl.  These
routines are called while some other C routine that implements a
Perl function is evaluated.  Does anyone have an idea of what value
should I give to the stack pointer in the C callback routine?
Currently I am setting a global variable to the value of the stack
pointer just before calling routines that might result in Perl
callbacks, but this is not very elegant.  I have also had a look
in the signal handler routine, but I got dizzy and anyway, I think 
it does a lot more than what I am trying to do.

Diomidis

PS I am quite aware of the phrase in perl-4.036/usub/README:

	It's not clear, for instance, how a given structure should be
	passed to Perl.  But that shouldn't bother you--if you've
	gotten this far, it's already obvious that you are totally
	mad.

-- 
Diomidis Spinellis    Internet: <dds@doc.ic.ac.uk>  UUCP: ...!uknet!icdoc!dds
Department of Computing, Imperial College, London SW7     #include "/dev/tty"



Newsgroup comp.lang.perl contents
Newsgroup list
Diomidis Spinellis home page

Creative Commons License Unless otherwise expressly stated, all original material on this page created by Diomidis Spinellis is licensed under a Creative Commons Attribution-Share Alike 3.0 Greece License.