I am trying to pass my C code to Perl Module through h2xs and Makefile.PL . Everythign whould be fine if not the fact that:


example:


AV * givemeav () {

  AV *av = newAV ();

}

After make install I can do:

use Devel::Peek 'Dump';

@list = Mymodule::givemeav();

Dump( [EMAIL PROTECTED] );

The Perl code above gives an output:

SV = RV(0x1015ecfc) at 0x101dffc8
  REFCNT = 1
  FLAGS = (TEMP,ROK)
  RV = 0x101bcc44
  SV = PVAV(0x101aae70) at 0x101bcc44
    REFCNT = 2
    FLAGS = (PADBUSY,PADMY)
    IV = 0
    NV = 0
    ARRAY = 0x101188c0
    FILL = 0
    MAX = 3
    ARYLEN = 0x0
    FLAGS = (REAL)
    Elt No. 0
    SV = RV(0x1015ed00) at 0x1017960c
      REFCNT = 1
      FLAGS = (ROK)
      RV = 0x101dffd4
      SV = PVAV(0x101e1278) at 0x101dffd4
        REFCNT = 2
        FLAGS = ()
        IV = 0
        NV = 0
        ARRAY = 0x0
        FILL = -1
        MAX = -1
        ARYLEN = 0x0
        FLAGS = (REAL)

This is the same as @list = ( [] ); but I need @list = (); in my C function. How to do it ? Assuming that I don't want to edit the *.xs files.

Thank You,
Best Regards

--
Pawel Matykiewicz
www.neuron.m4u.pl
Nicholaus Copenicus University,
Department of Informatics.
-------------------------------

Reply via email to