[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]

Re: New way to do XS constants



On Fri, Jan 07, 2000 at 11:56:13AM -0600, Tye McQueen wrote:
> Excerpts from the mail message of Graham Barr:
> ) #ifdef B110
> )         newCONSTSUB(stash,"B110", newSViv(B110));
> ) #else
> )         av_push(export_fail, newSVpv("B110",4));
> ) #endif
> ) 
> ) So that the import of B110 will fail if it does not exist.
> ) 
> ) But all of this requires entering long-hand. I think the original
> ) question was to get xsubpp to help out a bit, which I think would
> ) be a good idea.
> 
> Okay, so I should modify constants_pm_c.PLX to add code to the
> C<XS(boot_Module__Name)> routine in the generated Name.c?
> Perhaps just a C<#include "constants.h"> with F<constants.h>
> generated by a modified constants_pm_c.PLX [otherwise the
> B<make> dependencies would be too tricky]?

No need to do either. Get the user to add a INCLUDE directive into
the BOOT section of their .xs file.

Tim.


References to:
Graham Barr <gbarr@pobox.com>
Tye McQueen <tye@metronet.com>

[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]