this repo has no description
at trunk 28 lines 911 B view raw
1// Copyright (c) Facebook, Inc. and its affiliates. (http://www.facebook.com) 2#include "cpython-func.h" 3#include "cpython-types.h" 4 5#include "api-handle.h" 6#include "runtime.h" 7 8namespace py { 9 10PY_EXPORT PyTypeObject* PyLongRangeIter_Type_Ptr() { 11 Runtime* runtime = Thread::current()->runtime(); 12 return reinterpret_cast<PyTypeObject*>(ApiHandle::borrowedReference( 13 runtime, runtime->typeAt(LayoutId::kLongRangeIterator))); 14} 15 16PY_EXPORT PyTypeObject* PyRangeIter_Type_Ptr() { 17 Runtime* runtime = Thread::current()->runtime(); 18 return reinterpret_cast<PyTypeObject*>(ApiHandle::borrowedReference( 19 runtime, runtime->typeAt(LayoutId::kRangeIterator))); 20} 21 22PY_EXPORT PyTypeObject* PyRange_Type_Ptr() { 23 Runtime* runtime = Thread::current()->runtime(); 24 return reinterpret_cast<PyTypeObject*>( 25 ApiHandle::borrowedReference(runtime, runtime->typeAt(LayoutId::kRange))); 26} 27 28} // namespace py