Cpoying a PyList to a C string array

Klaas mike.klaas at gmail.com
Tue Dec 19 18:18:03 EST 2006


Sheldon wrote:

> Thanks Mike,
>
> I am rewriting the code but I don't understand the part about the c
> struct variable called work. The function I posted is a part of a
> larger script and I just posted that part that was problamatic. I was
> under the impression that if I declared the structure as global with
> the variable in tow:
>
> struct my_struct {
> int var;
> } work;
>
> then this is visible everywhere in the function as long as everything
> is in one file. Did I miss something?

It's not important how you declare the struct.  It matters what is in
the struct (in particular, the data types of the members, and what
initialization you've done to them).

The important part was the rest of my message.

-Mike




More information about the Python-list mailing list