We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8d1f7f6 commit 30d5020Copy full SHA for 30d5020
src/ops/nqp.ops
@@ -1949,11 +1949,14 @@ is none.
1949
1950
*/
1951
inline op nqp_get_sc_for_object(out PMC, invar PMC) :base_core {
1952
- if ($2->vtable->base_type == smo_id)
1953
- $1 = SC_PMC($2);
1954
- else
+ if ($2->vtable->base_type == smo_id) {
+ PMC *result = SC_PMC($2);
+ $1 = result ? result : PMCNULL;
1955
+ }
1956
+ else {
1957
Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_INVALID_OPERATION,
1958
"Can only use nqp_get_sc_for_object with a SixModelObject");
1959
1960
}
1961
1962
0 commit comments