Skip to content

Commit 6439823

Browse files
alexmalyshevmeta-codesync[bot]
authored andcommitted
Fix ThreadedRef::create(PyObject*) returning Ref instead of ThreadedRef
Summary: The template overload for non-PyObject types incorrectly returned Ref(...) instead of ThreadedRef(...). Since ThreadedRef has no implicit conversion from Ref and its copy constructor is deleted, this would fail to compile on first instantiation. Reviewed By: jbower-fb Differential Revision: D94927229 fbshipit-source-id: 06792d9811834c4e827db96f1c6d7c6f5930c26d
1 parent ea42ddf commit 6439823

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

cinderx/Jit/threaded_compile.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ class ThreadedRef : public RefBase<T> {
282282
template <typename X = T>
283283
requires(!IsPyObject<X>)
284284
static ThreadedRef create(PyObject* obj) {
285-
return Ref(reinterpret_cast<T*>(obj));
285+
return ThreadedRef(reinterpret_cast<T*>(obj));
286286
}
287287

288288
private:

0 commit comments

Comments
 (0)