Skip to content

Conversation

@nimasadri11
Copy link

No description provided.

@nimasadri11 nimasadri11 reopened this Aug 19, 2019
Copy link
Collaborator

@colinpattison colinpattison left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey Nima - thanks for the PR. A few changes highlighted around styling. I'm also going to request review from Rich on the subscript changes. I've reworked that code a bit on another branch to improve re-use so there will be some changes to it coming up soon

C

@@ -179,17 +189,21 @@ serializeBytes (PyObject* o, void*& v, size_t& l)
PyObject*
deserializeObject (void* buf, size_t len)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fix is correct however it needs made to pickleLoads and this function should be calling pickleLoads as the code is currently duplicated. Can you add this DECREF to pickeLoads and have this function call pickleLoads

rebuild.sh Outdated
@@ -0,0 +1,7 @@
#!/bin/bash -x
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please don't commit this script

#endif

return PyObject_CallMethodObjArgs (PICKLE_MODULE,
PyObject* res = PyObject_CallMethodObjArgs (PICKLE_MODULE,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - you need to add the same code here for the loads method name, and then subsequently decref it at the end

C

}


static char buffer[700000];

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, why did you make the buffer static out here I don't see why there was a memory leak with using the stack buffer?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This particular change was made for performance enhancing reasons.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants