Hi everyone, I've been experimenting with the ctypes module and think it's great. I'm hitting a few snags though with seg faults. I attached two links that holds the code. The line i'm having problems with is this,
sn=clibsmi.smiGetNextNode(pointer(sno),SMI_NODEKIND_ANY) It will work one time, and if I call it again with the result of the previous, even though the result (a c struct) looks ok, it will segfault. I think it's a problem with pointers or maybe the function in the c library trying to change a string that python won't let it change. I'm stuck, any tips would be appreciated. Thanks, and Merry Christmas! constants.py: http://pastebin.com/HvngjzZN libsmi.py: http://pastebin.com/19C9kYEa -- http://mail.python.org/mailman/listinfo/python-list