File tree Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change 55#include " common.h"
66#include " common_extension.h"
77#include " task.h"
8- # include " utarray.h "
9- #include " utstring.h "
8+
9+ #include < string >
1010
1111PyObject *CommonError;
1212
@@ -193,11 +193,8 @@ static long PyObjectID_hash(PyObjectID *self) {
193193static PyObject *PyObjectID_repr (PyObjectID *self) {
194194 char hex_id[ID_STRING_SIZE];
195195 ObjectID_to_string (self->object_id , hex_id, ID_STRING_SIZE);
196- UT_string *repr;
197- utstring_new (repr);
198- utstring_printf (repr, " ObjectID(%s)" , hex_id);
199- PyObject *result = PyUnicode_FromString (utstring_body (repr));
200- utstring_free (repr);
196+ std::string repr = " ObjectID(" + std::string (hex_id) + " )" ;
197+ PyObject *result = PyUnicode_FromString (repr.c_str ());
201198 return result;
202199}
203200
You can’t perform that action at this time.
0 commit comments