From 28eef45d28ffc430b4c00c3e959ca3930491b12e Mon Sep 17 00:00:00 2001 From: "Ralf W. Grosse-Kunstleve" Date: Thu, 12 Jan 2006 23:25:23 +0000 Subject: [PATCH] enum_print() removed; it was not reachable anyway since enum inherits from Python's built-in int type. However, the appearance of FILE* raised questions about using extensions compiled with Visual C++ 8 with a Python compiled with Visual C++ 7.1. [SVN r32301] --- src/object/enum.cpp | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/src/object/enum.cpp b/src/object/enum.cpp index e0438ee1..a96cc819 100644 --- a/src/object/enum.cpp +++ b/src/object/enum.cpp @@ -13,7 +13,6 @@ #include #include #include -#include namespace boost { namespace python { namespace objects { @@ -31,23 +30,6 @@ static PyMemberDef enum_members[] = { extern "C" { - static int - enum_print(PyObject *v, BOOST_CSTD_::FILE *fp, int flags) - { - PyObject* s - = (flags & Py_PRINT_RAW) ? v->ob_type->tp_str(v) : v->ob_type->tp_repr(v); - if (s == 0) - return -1; - - char const* text = PyString_AsString(s); - if (text == 0) - return -1; - - BOOST_CSTD_::fprintf(fp, text); - return 0; - } - - /* flags -- not used but required by interface */ static PyObject* enum_repr(PyObject* self_) { enum_object* self = downcast(self_); @@ -86,7 +68,7 @@ static PyTypeObject enum_type_object = { sizeof(enum_object), /* tp_basicsize */ 0, /* tp_itemsize */ 0, /* tp_dealloc */ - enum_print, /* tp_print */ + 0, /* tp_print */ 0, /* tp_getattr */ 0, /* tp_setattr */ 0, /* tp_compare */