Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: Perl XS binding to a struct with an array of chars*

by syphilis (Archbishop)
on Nov 20, 2022 at 13:06 UTC ( [id://11148270]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    typedef Edje_Message_String_Set EdjeMessageStringSet;
    should instead be:
    typedef struct _Edje_Message_String_Set EdjeMessageStringSet;
    
  2. or download this
    message = malloc(sizeof(Edje_Message_String) + count * sizeof(char *))
    +;
    
  3. or download this
    message = malloc(sizeof(EdjeMessageStringSet));
    or
    New(0, message, 1, EdjeMessageStringSet);
    or (in modern perl)
    Newx(message, 1, EdjeMessageStringSet);
    
  4. or download this
    # struct.pl #
    use strict;
    ...
    
    struct_size();
    foo("hello world", 2, [1, 2]);
    
  5. or download this
    Size of _Edje_Message_String_Set struct: 16
    returning EdjeMessageStringSet* from _new
    destroyed _new EdjeMessageStringSet*
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11148270]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (5)
As of 2024-03-28 08:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found