Lines Matching refs:PyRef
128 static void getRuntimeImpl( PyRef & globalDict, PyRef &runtimeImpl ) in getRuntimeImpl()
139 globalDict = PyRef( PyModule_GetDict(PyImport_AddModule(const_cast< char * >("__main__")))); in getRuntimeImpl()
149 static PyRef importUnoModule( ) throw ( RuntimeException ) in importUnoModule()
151 … PyRef globalDict = PyRef( PyModule_GetDict(PyImport_AddModule(const_cast< char * >("__main__")))); in importUnoModule()
153 PyRef module( PyImport_ImportModule( const_cast< char * >("uno") ), SAL_NO_ACQUIRE ); in importUnoModule()
156 PyRef excType, excValue, excTraceback; in importUnoModule()
158 PyRef str( PyObject_Repr( excTraceback.get() ), SAL_NO_ACQUIRE ); in importUnoModule()
162 PyRef valueRep( PyObject_Repr( excValue.get() ), SAL_NO_ACQUIRE ); in importUnoModule()
168 PyRef dict( PyModule_GetDict( module.get() ) ); in importUnoModule()
239 PyRef stRuntimeImpl::create( const Reference< XComponentContext > &ctx ) in create()
315 return PyRef( reinterpret_cast< PyObject * > ( me ), SAL_NO_ACQUIRE ); in create()
331 PyRef globalDict, runtime; in initialize()
341 PyRef keep( RuntimeImpl::create( ctx ) ); in initialize()
349 PyRef globalDict, runtime; in isInitialized()
357 PyRef globalDict, runtime; in finalize()
375 PyRef globalDict, runtime; in Runtime()
401 PyRef temp( reinterpret_cast< PyObject * >(r.impl) ); in operator =()
408 PyRef Runtime::any2PyObject (const Any &a ) const in any2PyObject()
425 return PyRef(Py_None); in any2PyObject()
430 return PyRef( PyUNO_char_new( c , *this ), SAL_NO_ACQUIRE ); in any2PyObject()
448 return PyRef( PyLong_FromLong (l), SAL_NO_ACQUIRE ); in any2PyObject()
450 return PyRef( PyInt_FromLong (l), SAL_NO_ACQUIRE ); in any2PyObject()
457 return PyRef( PyLong_FromUnsignedLong (l), SAL_NO_ACQUIRE ); in any2PyObject()
463 return PyRef( PyLong_FromLongLong (l), SAL_NO_ACQUIRE); in any2PyObject()
469 return PyRef( PyLong_FromUnsignedLongLong (l), SAL_NO_ACQUIRE); in any2PyObject()
475 return PyRef(PyFloat_FromDouble (f), SAL_NO_ACQUIRE); in any2PyObject()
481 return PyRef( PyFloat_FromDouble (d), SAL_NO_ACQUIRE); in any2PyObject()
494 return PyRef( in any2PyObject()
520 return PyRef( PyUNO_Enum_new(e.getStr(),v.getStr(), *this ), SAL_NO_ACQUIRE ); in any2PyObject()
533 PyRef excClass = getClass( a.getValueType().getTypeName(), *this ); in any2PyObject()
534 … PyRef value = PyRef( PyUNO_new_UNCHECKED (a, getImpl()->cargo->xInvocation), SAL_NO_ACQUIRE); in any2PyObject()
535 PyRef argsTuple( PyTuple_New( 1 ) , SAL_NO_ACQUIRE ); in any2PyObject()
537 PyRef ret( PyObject_CallObject( excClass.get() , argsTuple.get() ), SAL_NO_ACQUIRE ); in any2PyObject()
549 PyRef args( PyTuple_New( 1 ), SAL_NO_ACQUIRE ); in any2PyObject()
554 PyRef pymsg = USTR_TO_PYSTR( message ); in any2PyObject()
571 return PyRef( PyUNO_ByteSequence_new( byteSequence, *this ), SAL_NO_ACQUIRE ); in any2PyObject()
578 PyRef tuple( PyTuple_New (s.getLength()), SAL_NO_ACQUIRE); in any2PyObject()
585 PyRef element; in any2PyObject()
614 return PyRef( PyUNO_new (a, getImpl()->cargo->xInvocation), SAL_NO_ACQUIRE ); in any2PyObject()
633 PyRef method( PyObject_GetAttrString( o , const_cast< char * >("getTypes") ), SAL_NO_ACQUIRE ); in invokeGetTypes()
637 PyRef types( PyObject_CallObject( method.get(), 0 ) , SAL_NO_ACQUIRE ); in invokeGetTypes()
656 Any Runtime::pyObject2Any ( const PyRef & source, enum ConversionMode mode ) const in pyObject2Any()
769 PyRef str(PyObject_GetAttrString( o , const_cast< char * >("value") ),SAL_NO_ACQUIRE); in pyObject2Any()
797 PyRef struc(PyObject_GetAttrString( o , const_cast< char * >("value") ),SAL_NO_ACQUIRE); in pyObject2Any()
843 …a = pyObject2Any( PyRef( PyObject_GetAttrString( o , const_cast< char * >("value") ), SAL_NO_ACQUI… in pyObject2Any()
845 …pyObject2Any( PyRef( PyObject_GetAttrString( o, const_cast< char * >("type") ), SAL_NO_ACQUIRE ) )… in pyObject2Any()
871 PyRef2Adapter::iterator ii = impl->cargo->mappedObjects.find( PyRef( o ) ); in pyObject2Any()
901 impl->cargo->mappedObjects[ PyRef(o) ] = in pyObject2Any()
913 PyRef reprString( PyObject_Str( o ) , SAL_NO_ACQUIRE ); in pyObject2Any()
923 Any Runtime::extractUnoException( const PyRef & excType, const PyRef &excValue, const PyRef &excTra… in extractUnoException()
925 PyRef str; in extractUnoException()
929 PyRef unoModule( impl ? impl->cargo->getUnoModule() : 0 ); in extractUnoException()
932 PyRef extractTraceback( in extractUnoException()
937 PyRef args( PyTuple_New( 1), SAL_NO_ACQUIRE ); in extractUnoException()
939 … str = PyRef( PyObject_CallObject( extractTraceback.get(),args.get() ), SAL_NO_ACQUIRE); in extractUnoException()
943 str = PyRef( in extractUnoException()
950 str = PyRef( in extractUnoException()
959 str = PyRef( PyBytes_FromString( "no traceback available" ), SAL_NO_ACQUIRE); in extractUnoException()
969 PyRef typeName( PyObject_Str( excType.get() ), SAL_NO_ACQUIRE ); in extractUnoException()
979 PyRef valueRep( PyObject_Str( excValue.get() ), SAL_NO_ACQUIRE ); in extractUnoException()
1038 PyRef locale( // python requires C locale in PyThreadAttach()
1081 PyRef RuntimeCargo::getUnoModule() in getUnoModule()