On Tue, Aug 30, 2016 at 3:30 AM, Ganesh Pal <ganesh1...@gmail.com> wrote: > +char dda_hello(int i) > + { > + return string[i]; > + } > + > + return Py_BuildValue("s",char1);
Py_BuildValue with an "s" expects a C string - that is, a pointer to char, not just a single character. You'd need to do something like this: char buf[2] = {char1, 0}; return Py_BuildValue("s", buf); ChrisA -- https://mail.python.org/mailman/listinfo/python-list