Improve error-handling for PyCapsule_GetPointer and related functions.
This commit is contained in:
parent
0079b1de07
commit
9767ac4d47
4 changed files with 17 additions and 119 deletions
|
|
@ -320,10 +320,6 @@ unsigned char* LLVMTargetMachineEmitFile(LLVMTargetMachineRef tmref,
|
|||
// and then into a new buffer
|
||||
size_t bclen = bc.size();
|
||||
unsigned char *bytes = new unsigned char[bclen];
|
||||
if (!bytes){
|
||||
error = "Out of memory";
|
||||
return NULL;
|
||||
}
|
||||
memcpy(bytes, bc.data(), bclen);
|
||||
|
||||
/* return */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue