First of all, change the class name, as Paul suggested. Use 'my_list' or whatever you want, but not 'list'. Secondly: the code you posted looks ok for me. I cannot tell why it jumps into _string.c. Could you make a small application that reproduces the error and post the code? This way we might have a better chance to pin down the bug.