Regarding question2, ulpcallback is a structure of type ulp_callback, How to declare it in typemap file??

for constant char * ,i have added a code in typemap file which looks like

const char *    T_PV

Simillarly how can i declare struct ulp_callback ulpcallback in typemap??

ulpcallback is a datatype in one of my C function. To call that function from perl, i have added a subroutine in .xs file.which looks like.
int f1(a,b,c) int a int b ulpcallback c OUTPUT: RETVAL
when i try to compile it ,it is giving an error that,Error: 'ulpCallback' not in typemap in Mytest2.xs, line 26

here ulpCallback is of type struct ulp_Callback (in C ). I want to declare that in typemap file .How to do that?? I am not familiar to perlxs..and i have no idea abt T_PV etc. Plz help me regarding this.

I added ulpCallback in typemap file as

 ulpCallback T_PTROBJ

Now its not giving that error,But after running make it shows an error Mytest2.c:164: error: conversion to non-scalar type requested Any help regarding this??? Hi all,

My C function expects an array(single dimension)as a parameter,how to declare it in .xs file??

int f1(a,b,c[LEN]) int a int b unsigned char c[LEN] OUTPUT: RETVAL

This gives an error saying that invalid declaration of cLEN.Plz help me.


In reply to perlxs help by KVB

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.