Commit 0d111f89 authored by Kevin Modzelewski's avatar Kevin Modzelewski

Loosen these checks if we imported a third party c extension

parent 026b316f
...@@ -43,6 +43,7 @@ ...@@ -43,6 +43,7 @@
#include "runtime/generator.h" #include "runtime/generator.h"
#include "runtime/hiddenclass.h" #include "runtime/hiddenclass.h"
#include "runtime/ics.h" #include "runtime/ics.h"
#include "runtime/import.h"
#include "runtime/iterobject.h" #include "runtime/iterobject.h"
#include "runtime/long.h" #include "runtime/long.h"
#include "runtime/rewrite_args.h" #include "runtime/rewrite_args.h"
...@@ -4964,7 +4965,7 @@ Box* callCLFunc(FunctionMetadata* md, CallRewriteArgs* rewrite_args, int num_out ...@@ -4964,7 +4965,7 @@ Box* callCLFunc(FunctionMetadata* md, CallRewriteArgs* rewrite_args, int num_out
// We check for this assertion later too - by checking it twice, we know // We check for this assertion later too - by checking it twice, we know
// if the error state was set before calling the chosen CF or after. // if the error state was set before calling the chosen CF or after.
ASSERT(!PyErr_Occurred(), ""); ASSERT(imported_foreign_cextension || !PyErr_Occurred(), "");
Box* r; Box* r;
// we duplicate the call to callChosenCf here so we can // we duplicate the call to callChosenCf here so we can
...@@ -4989,7 +4990,7 @@ Box* callCLFunc(FunctionMetadata* md, CallRewriteArgs* rewrite_args, int num_out ...@@ -4989,7 +4990,7 @@ Box* callCLFunc(FunctionMetadata* md, CallRewriteArgs* rewrite_args, int num_out
ASSERT(chosen_cf->spec->rtn_type->isFitBy(r->cls), "%s (%p) was supposed to return %s, but gave a %s", ASSERT(chosen_cf->spec->rtn_type->isFitBy(r->cls), "%s (%p) was supposed to return %s, but gave a %s",
g.func_addr_registry.getFuncNameAtAddress(chosen_cf->code, true, NULL).c_str(), chosen_cf->code, g.func_addr_registry.getFuncNameAtAddress(chosen_cf->code, true, NULL).c_str(), chosen_cf->code,
chosen_cf->spec->rtn_type->debugName().c_str(), r->cls->tp_name); chosen_cf->spec->rtn_type->debugName().c_str(), r->cls->tp_name);
ASSERT(!PyErr_Occurred(), "%p", chosen_cf->code); ASSERT(imported_foreign_cextension || !PyErr_Occurred(), "%p", chosen_cf->code);
} }
return r; return r;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment