Skip to content

Commit 060f59d

Browse files
committed
Fix declaration bug
Workaround broken MSVC6 stdlib [SVN r15227]
1 parent 4117614 commit 060f59d

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/object/enum.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,10 @@ static PyMemberDef enum_members[] = {
2929
};
3030

3131

32-
extern "C" {
32+
extern "C"
33+
{
3334
static int
34-
enum_print(PyObject *v, std::FILE *fp, int flags)
35+
enum_print(PyObject *v, BOOST_CSTD_::FILE *fp, int flags)
3536
{
3637
PyObject* s
3738
= (flags & Py_PRINT_RAW) ? v->ob_type->tp_str(v) : v->ob_type->tp_repr(v);
@@ -42,7 +43,7 @@ extern "C" {
4243
if (text == 0)
4344
return -1;
4445

45-
std::fprintf(fp, text);
46+
BOOST_CSTD_::fprintf(fp, text);
4647
return 0;
4748
}
4849

@@ -195,7 +196,7 @@ void enum_base::add_value(char const* name_, long value)
195196

196197
PyObject* enum_base::to_python(PyTypeObject* type_, long x)
197198
{
198-
object type(type_handle(borrowed(type_)));
199+
object type((type_handle(borrowed(type_))));
199200

200201
dict d = extract<dict>(type.attr("values"))();
201202
object v = d.get(x, object());

0 commit comments

Comments
 (0)