pyuno_impl.hxx (89e52773) pyuno_impl.hxx (77dc4149)
1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements. See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership. The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance

--- 29 unchanged lines hidden (view full) ---

38#include <com/sun/star/container/XHierarchicalNameAccess.hpp>
39
40#include <com/sun/star/lang/XUnoTunnel.hpp>
41#include <com/sun/star/lang/XSingleServiceFactory.hpp>
42
43#include <cppuhelper/implbase2.hxx>
44#include <cppuhelper/weakref.hxx>
45
1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements. See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership. The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance

--- 29 unchanged lines hidden (view full) ---

38#include <com/sun/star/container/XHierarchicalNameAccess.hpp>
39
40#include <com/sun/star/lang/XUnoTunnel.hpp>
41#include <com/sun/star/lang/XSingleServiceFactory.hpp>
42
43#include <cppuhelper/implbase2.hxx>
44#include <cppuhelper/weakref.hxx>
45
46//
47// Local workarounds for compatibility issues
48//
49#if PY_MAJOR_VERSION >= 3
50 #define PYSTR_FROMSTR PyUnicode_FromString
51 #define USTR_TO_PYSTR ustring2PyUnicode
52 #define PYSTR_CHECK PyUnicode_Check
53#else
54 #define PYSTR_FROMSTR PyBytes_FromString
55 #define USTR_TO_PYSTR ustring2PyString
56 #define PYSTR_CHECK PyBytes_Check
57#endif
58
46namespace pyuno
47{
48
49//--------------------------------------------------
50// Logging API - implementation can be found in pyuno_util
51//--------------------------------------------------
52struct RuntimeCargo;
53namespace LogLevel

--- 102 unchanged lines hidden (view full) ---

156
157PyObject *importToGlobal( PyObject *typeName, PyObject *dict, PyObject *targetName );
158
159PyRef getTypeClass( const Runtime &);
160PyRef getEnumClass( const Runtime &);
161PyRef getBoolClass( const Runtime &);
162PyRef getCharClass( const Runtime &);
163PyRef getByteSequenceClass( const Runtime & );
59namespace pyuno
60{
61
62//--------------------------------------------------
63// Logging API - implementation can be found in pyuno_util
64//--------------------------------------------------
65struct RuntimeCargo;
66namespace LogLevel

--- 102 unchanged lines hidden (view full) ---

169
170PyObject *importToGlobal( PyObject *typeName, PyObject *dict, PyObject *targetName );
171
172PyRef getTypeClass( const Runtime &);
173PyRef getEnumClass( const Runtime &);
174PyRef getBoolClass( const Runtime &);
175PyRef getCharClass( const Runtime &);
176PyRef getByteSequenceClass( const Runtime & );
164PyRef getPyUnoClass( const Runtime &);
177PyRef getPyUnoClass();
165PyRef getClass( const rtl::OUString & name , const Runtime & runtime );
166PyRef getAnyClass( const Runtime &);
167PyObject *PyUNO_invoke( PyObject *object, const char *name , PyObject *args );
168
169com::sun::star::uno::Any PyEnum2Enum( PyObject *obj )
170 throw ( com::sun::star::uno::RuntimeException );
171sal_Bool PyBool2Bool( PyObject *o, const Runtime & r )
172 throw ( com::sun::star::uno::RuntimeException );

--- 117 unchanged lines hidden ---
178PyRef getClass( const rtl::OUString & name , const Runtime & runtime );
179PyRef getAnyClass( const Runtime &);
180PyObject *PyUNO_invoke( PyObject *object, const char *name , PyObject *args );
181
182com::sun::star::uno::Any PyEnum2Enum( PyObject *obj )
183 throw ( com::sun::star::uno::RuntimeException );
184sal_Bool PyBool2Bool( PyObject *o, const Runtime & r )
185 throw ( com::sun::star::uno::RuntimeException );

--- 117 unchanged lines hidden ---