| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
cpythonToPythonConversionFunction.
The new overload of cpythonToPythonConversionFunction, that is.
Reviewed by Luciano Wolf <luciano.wolf@openbossa.org>
Reviewed by Renato Araújo <renato.filho@openbossa.org>
|
|
|
|
|
|
|
|
| |
Added the SBK_UNUSED macro to libshiboken to prevent compilation warnings.
An unit test was added.
Reviewed by Hugo Parente <hugo.lima@openbossa.org>
Reviewed by Luciano Wolf <luciano.wolf@openbossa.org>
|
|
|
|
| |
ShibokenGenerator uses qDeleteAll for the cached meta types.
|
|
|
|
|
|
|
|
|
| |
Such a method is safer than the previous that used only a regular
expression, because now it tries to build a meta type for the type
found in the user's custom code.
Reviewed by Luciano Wolf <luciano.wolf@openbossa.org>
Reviewed by Renato Araújo <renato.filho@openbossa.org>
|
|
|
|
|
| |
The methods writeToCppConversion and writeToPythonConversion now use the
services of cpythonToCppConversionFunction and cpythonToPythonConversionFunction.
|
| |
|
|
|
|
|
|
| |
Now classes that are typedefs to template class instantiations are
written twice with the same index: one with the aliased name, and other
with the name composed of template and template arguments.
|
|
|
|
| |
An unit test was also added for it.
|
|
|
|
|
|
|
|
|
|
| |
known types.
This is in opposition of simply returning a string with a custom type
check. The details are in the docstring in ShibokenGenerator header.
Also added a new modification test and refactored here and there in the
sample binding type system.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
existing ones.
Specifically this causes the situation when there is in C++ a function
with an argument that is a reference to a Value Type, and the user adds
a very similar function with the same type, but passed as value.
Example:
C++ : function(const TYPE& a, int b)
Added: function(TYPE)
The return type of ShibokenGenerator::getArgumentReplacement() method
was modified, because the argument object is more useful than its index.
|
|
|
|
|
|
|
|
|
|
| |
rule.
Also added an array argument modification test, and moved
AutoArrayPointer from libpyside to libshiboken.
Reviewed by Hugo Parente <hugo.lima@openbossa.org>
Reviewed by Luciano Wolf <luciano.wolf@openbossa.org>
|
| |
|
|
|
|
|
|
|
|
| |
Also added writeConversionRule methods to CppGenerator.
Reviewed by Hugo Parente <hugo.lima@openbossa.org>
Reviewed by Luciano Wolf <luciano.wolf@openbossa.org>
Reviewed by Renato Araújo <renato.filho@openbossa.org>
|
|
|
|
|
|
|
|
|
|
|
| |
Also fixed ShibokenGenerator::pythonFunctionWrapperUsesListOfArguments()
method to consider call operators. Fixed code snippet variable
replacement for when there's only one Python argument in the function.
And CppGenerator::writeArgumentsInitializer() was sanitized, with never
used code erased.
Reviewed by Luciano Wolf <luciano.wolf@openbossa.org>
Reviewed by Renato Araújo <renato.filho@openbossa.org>
|
|
|
|
|
| |
It's way less messy now, and uses writeTypeCheck() as it should have
been doing from the beginning.
|
|
|
|
|
| |
Reviewed by Hugo Parente <hugo.lima@openbossa.org>
Reviewed by Luciano Wolf <luciano.wolf@openbossa.org>
|
|
|
|
|
|
|
|
| |
The method in question is CppGenerator::getArgumentType(), and it
resolves any type modification made in the type system.
Also remove an unused convenience method for writeArgumentConversion,
and unused variable on rich comparison writer function.
|
|
|
|
| |
method.
|
| |
|
|
|
|
| |
Added test for a reference to integer as a function argument.
|
|
|
|
|
|
| |
Generator Runner.
They were needed by other methods in the Generator class.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The new methods replace the contents of the following type system
variables:
%CONVERTTOPYTHON
%CONVERTTOCPP
%ISCONVERTIBLE
%CHECKTYPE
The replacements were part of the ShibokenGenerator::writeCodeSnips()
method.
|
|
|
|
|
|
|
|
| |
ShibokenGenerator::isPointer()
ShibokenGenerator::isWrapperType()
Reviewed by Hugo Parente <hugo.lima@openbossa.org>
Reviewed by Luciano Wolf <luciano.wolf@openbossa.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Checking if a type is an Object Type is a very common task, followed
by asking if a type is a pointer to a type that has a Python wrapper.
These functions solve the problem:
ShibokenGenerator::isObjectType(type)
ShibokenGenerator::isPointerToWrapperType(type)
I refactored the generator code to make use of those functions.
Reviewed by Hugo Parente <hugo.lima@openbossa.org>
Reviewed by Lauro Moura <lauro.neto@openbossa.org>
Reviewed by Luciano Wolf <luciano.wolf@openbossa.org>
|
|
|
|
|
|
|
| |
Fix bug #919.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
Hugo Parente Lima <hugo.pl@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently the variables are replaced as follows:
* %ISCONVERTIBLE[CPPTYPE] -> Shiboken::Converter<CPPTYPE>::isConvertible
* %CHECKTYPE[CPPTYPE] -> Shiboken::Converter<CPPTYPE>::checkType
Future improvements may change that, so having these variables is
a good thing.
The documentation was updated.
Reviewed by Luciano Wolf <luciano.wolf@openbossa.org>
Reviewed by Renato Araujo <renato.filho@openbossa.org>
|
|
|
|
|
|
|
| |
metaObject() method.
Reviewed by Luciano Wolf <luciano.wolf@openbossa.org>
Reviewed by Renato Araújo <renato.filho@openbossa.org>
|
|
|
|
|
|
| |
calls.
Unit tests were also added.
|
|
|
|
|
|
|
| |
prefix) on all places."
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
Marcelo Lira <marcelo.lira@openbossa.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This interface is just a wrapper to the differents API's provided by Python
to deal with memory buffers in various versions of Python, so is recommended
to use this API to deal with Python memory buffers instead of the CPython API.
If you want to have a Python buffer as argument of any function just change
the argument type to "PyBuffer" and the generator will handle it right regarding
to type checking.
Reviewer: Renato Araújo <renato.filho@openbossa.org>
Luciano Wolf <luciano.wolf@openbossa.org>
|
|
|
|
|
| |
Reviewer: Lauro Moura <lauro.neto@openbossa.org>
Marcelo Lira <marcelo.lira@openbossa.org>
|
| |
|
|
|
|
|
| |
libshiboken/basewrapper.cpp:212:57: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
generator/shibokengenerator.cpp:1118:9: warning: variable ‘numArgs’ set but not used [-Wunused-but-set-variable]
|
|
|
|
|
|
|
| |
Fixes bug #688.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
Luciano Wolf <luciano.wolf@openbossa.org>
|
|
|
|
|
|
|
|
|
|
| |
Also moved the save and restore thread state lines to a macro in
ShibokenGenerator header file.
The type system variables documentation was updated accordingly.
Reviewed by Lauro Moura <lauro.neto@openbossa.org>
Reviewed by Luciano Wolf <luciano.wolf@openbossa.org>
|
|
|
|
|
|
|
|
| |
Instead of the old ugly way of compiling the behaviour forever using
"#define".
Reviewed by Hugo Parente <hugo.lima@openbossa.org>
Reviewed by Luciano Wolf <luciano.wolf@openbossa.org>
|
|
|
|
|
|
|
|
|
|
| |
before ancestor.
A couple of ShibokenGenerator methods were made "const" to allow them to
be called from OverloadDecisor.
Reviewed by Hugo Parente <hugo.lima@openbossa.org>
Reviewed by Luciano Wolf <luciano.wolf@openbossa.org>
|
|
|
|
|
| |
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
Hugo Parente Lima <hugo.pl@gmail.com>
|
|
|
|
|
|
|
|
|
|
| |
%CPPTYPE will be converted to the original C++ name of a class,
without any "Wrapper" suffix or namespace prefix.
Documentation for the new variable was added as well.
Reviewed by Hugo Parente <hugo.lima@openbossa.org>
Reviewed by Luciano Wolf <luciano.wolf@openbossa.org>
|
|
|
|
| |
%TYPE documentation was updated.
|
|
|
|
|
|
|
| |
types?) returns True for empty instance; probably should be False"
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
Renato Araújo <renato.filho@openbossa.org>
|
|
|
|
|
| |
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
Lauro Moura <lauro.neto@openbossa.org>
|
|
|
|
|
|
|
|
|
|
| |
Classes in namespaces marked not to be generated are always moved to
upper scopes, the current modification add this same behaviour to enums.
Tests were also added.
Reviewed by Lauro Moura <lauro.neto@openbossa.org>
Reviewed by Renato Araújo <renato.filho@openbossa.org>
|
|
|
|
|
|
|
| |
QList<QVariant>)"
Reviewer: Renato Araújo <renato.filho@openbossa.org>
Marcelo Lira <marcelo.lira@openbossa.org>
|
|
|
|
|
|
| |
When a conversion rule is provided for a constructor argument the C++
constructor, for which the conversion rule doesn't apply, is generated
with wrong argument names. This commit solves this.
|
|
|
|
| |
const ref. value types and enums.
|
| |
|
| |
|
| |
|