perl.beginners
[Top] [All Lists]

Re: XS

Subject: Re: XS
From: pd520@xxxxxxxxxx (Patrick Dupre)
Date: Thu, 31 Jul 2008 00:43:37 +0100 (BST)
Newsgroups: perl.beginners
OK, it works by putting the header file at the beginig of my c file:
EXTERN.h, etc.

Regards

Patrick Dupre wrote:

Inside a c routine (ie. inside a .c file) is there any way to define a
variable of type SV (or SV *) ?
From xs, it is no problem.

Yes. You can say

 SV *var = &PL_sv_undef;

which creates an undefined scalar. But what do you want to do with it?

Rob


--
---
==========================================================================
 Patrick DUPRÉ                      |   |
 Department of Chemistry            |   |    Phone: (44)-(0)-1904-434384
 The University of York             |   |    Fax:   (44)-(0)-1904-432516
 Heslington                         |   |
 York YO10 5DD  United Kingdom      |   |    email: pd520@xxxxxxxxxx
==========================================================================
<Prev in Thread] Current Thread [Next in Thread>