Converted rest of slot outputting to use printSlot.

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/szager-python-builtin@12583 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Stefan Zager 2011-03-31 21:26:12 +00:00
commit 51ef340eed

View file

@ -3473,42 +3473,42 @@ public:
// PySequenceMethods as_sequence; // PySequenceMethods as_sequence;
Printf(f, " {\n"); Printf(f, " {\n");
Printf(f, " (lenfunc) %s, // sq_length\n", getSlot(n, "feature:python:sq_length")); printSlot(f, getSlot(n, "feature:python:sq_length"), "sq_length", "lenfunc");
Printf(f, " (binaryfunc) %s, // sq_concat\n", getSlot(n, "feature:python:sq_concat")); printSlot(f, getSlot(n, "feature:python:sq_concat"), "sq_concat", "binaryfunc");
Printf(f, " (ssizeargfunc) %s, // sq_repeat\n", getSlot(n, "feature:python:sq_repeat")); printSlot(f, getSlot(n, "feature:python:sq_repeat"), "sq_repeat", "ssizeargfunc");
Printf(f, " (ssizeargfunc) %s, // sq_item\n", getSlot(n, "feature:python:sq_item")); printSlot(f, getSlot(n, "feature:python:sq_item"), "sq_item", "ssizeargfunc");
Printv(f, "#if PY_VERSION_HEX >= 0x03000000\n", NIL); Printv(f, "#if PY_VERSION_HEX >= 0x03000000\n", NIL);
Printf(f, " (void*) %s, // was_sq_slice\n", getSlot(n, "feature:was_sq_slice")); printSlot(f, getSlot(n, "feature:was_sq_slice"), "was_sq_slice", "void*");
Printv(f, "#else\n", NIL); Printv(f, "#else\n", NIL);
Printf(f, " (ssizessizeargfunc) %s, // sq_slice\n", getSlot(n, "feature:python:sq_slice")); printSlot(f, getSlot(n, "feature:python:sq_slice"), "sq_slice", "ssizessizeargfunc");
Printv(f, "#endif\n", NIL); Printv(f, "#endif\n", NIL);
Printf(f, " (ssizeobjargproc) %s, // sq_ass_item\n", getSlot(n, "feature:python:sq_ass_item")); printSlot(f, getSlot(n, "feature:python:sq_ass_item"), "sq_ass_item", "ssizeobjargproc");
Printv(f, "#if PY_VERSION_HEX >= 0x03000000\n", NIL); Printv(f, "#if PY_VERSION_HEX >= 0x03000000\n", NIL);
Printf(f, " (void*) %s, // was_sq_ass_slice\n", getSlot(n, "feature:was_sq_ass_slice")); printSlot(f, getSlot(n, "feature:was_sq_ass_slice"), "was_sq_ass_slice", "void*");
Printv(f, "#else\n", NIL); Printv(f, "#else\n", NIL);
Printf(f, " (ssizessizeobjargproc) %s, // sq_ass_slice\n", getSlot(n, "feature:python:sq_ass_slice")); printSlot(f, getSlot(n, "feature:python:sq_ass_slice"), "sq_ass_slice", "ssizessizeobjargproc");
Printv(f, "#endif\n", NIL); Printv(f, "#endif\n", NIL);
Printf(f, " (objobjproc) %s, // sq_contains\n", getSlot(n, "feature:python:sq_contains")); printSlot(f, getSlot(n, "feature:python:sq_contains"), "sq_contains", "objobjproc");
Printf(f, " (binaryfunc) %s, // sq_inplace_concat\n", getSlot(n, "feature:python:sq_inplace_concat")); printSlot(f, getSlot(n, "feature:python:sq_inplace_concat"), "sq_inplace_concat", "binaryfunc");
Printf(f, " (ssizeargfunc) %s, // sq_inplace_repeat\n", getSlot(n, "feature:python:sq_inplace_repeat")); printSlot(f, getSlot(n, "feature:python:sq_inplace_repeat"), "sq_inplace_repeat", "ssizeargfunc");
Printf(f, " },\n"); Printf(f, " },\n");
// PyBufferProcs as_buffer; // PyBufferProcs as_buffer;
Printf(f, " {\n"); Printf(f, " {\n");
Printv(f, "#if PY_VERSION_HEX >= 0x03000000\n", NIL); Printv(f, "#if PY_VERSION_HEX >= 0x03000000\n", NIL);
Printf(f, " (getbufferproc) %s, // bf_getbuffer\n", getSlot(n, "feature:python:bf_getbuffer")); printSlot(f, getSlot(n, "feature:python:bf_getbuffer"), "bf_getbuffer", "getbufferproc");
Printf(f, " (releasebufferproc) %s, // bf_releasebuffer\n", getSlot(n, "feature:python:bf_releasebuffer")); printSlot(f, getSlot(n, "feature:python:bf_releasebuffer"), "bf_releasebuffer", "releasebufferproc");
Printv(f, "#else\n", NIL); Printv(f, "#else\n", NIL);
Printf(f, " (readbufferproc) %s, // bf_getreadbuffer\n", getSlot(n, "feature:python:bf_getreadbuffer")); printSlot(f, getSlot(n, "feature:python:bf_getreadbuffer"), "bf_getreadbuffer", "readbufferproc");
Printf(f, " (writebufferproc) %s, // bf_getwritebuffer\n", getSlot(n, "feature:python:bf_getwritebuffer")); printSlot(f, getSlot(n, "feature:python:bf_getwritebuffer"), "bf_getwritebuffer", "writebufferproc");
Printf(f, " (segcountproc) %s, // bf_getsegcount\n", getSlot(n, "feature:python:bf_getsegcount")); printSlot(f, getSlot(n, "feature:python:bf_getsegcount"), "bf_getsegcount", "segcountproc");
Printf(f, " (charbufferproc) %s, // bf_getcharbuffer\n", getSlot(n, "feature:python:bf_getcharbuffer")); printSlot(f, getSlot(n, "feature:python:bf_getcharbuffer"), "bf_getcharbuffer", "charbufferproc");
Printv(f, "#endif\n", NIL); Printv(f, "#endif\n", NIL);
Printf(f, " },\n"); Printf(f, " },\n");
// PyObject *ht_name, *ht_slots // PyObject *ht_name, *ht_slots
Printf(f, " (PyObject*) %s, // ht_name\n", getSlot(n, "feature:python:ht_name")); printSlot(f, getSlot(n, "feature:python:ht_name"), "ht_name", "PyObject*");
Printf(f, " (PyObject*) %s, // ht_slots\n", getSlot(n, "feature:python:ht_slots")); printSlot(f, getSlot(n, "feature:python:ht_slots"), "ht_slots", "PyObject*");
Printf(f, "};\n\n"); Printf(f, "};\n\n");
String *clientdata = NewString(""); String *clientdata = NewString("");