| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
Version bumped to 0.2.0.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
Reviewer: Lauro Moura <lauro.neto@openbossa.org>
|
|
|
|
|
| |
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
Reviewer: Lauro Moura <lauro.neto@openbossa.org>
|
|
|
|
|
|
|
|
| |
The void* converter transforms a C++ NULL pointer in a Python None.
An unit test for this case was added as well.
Reviewed by Anderson Lizardo <anderson.lizardo@openbossa.org>
Reviewed by Bruno Araújo <bruno.araujo@openbossa.org>
|
|
|
|
|
|
| |
With the recent changes to Converter's behaviour, in particular to
isConvertible method, Converter<T*>::toCpp must deal with Py_None
values first.
|
|\ |
|
| | |
|
|/
|
|
|
| |
Reviewer: Bruno Araújo <bruno.araujo@openbossa.org>
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
|
|
|
|
| |
is binded by Shiboken (like QStringList).
|
| |
|
|
|
|
|
|
| |
Not for binded types implementing sequence protocol, otherwise this will
cause a mess like QBitArray being accepted by someone expecting a
QStringList.
|
|
|
|
| |
generated by Shiboken generator.
|
|
|
|
| |
templates.
|
|
|
|
|
|
|
| |
null pointer.
Pro: Will be possible to write template functions to handle sequence conversions.
Cons: We will not have an unresolved symbol when an error occur on generator.
|
|
|
|
| |
Shiboken::cppObjectIsInvalid function.
|
| |
|
|
|
|
|
|
|
|
|
| |
The new semantic is:
Returns true when the type can be converted to T OR the type is T.
The old semantic was:
Returns true when the type can be converted to T and false if the
type is T, however int and float converters did not follow this
rule, because they used PyNumber_Check on their isConvertible implementation.
|
| |
|
| |
|
|\
| |
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
cppgenerator.cpp
libshiboken/basewrapper.cpp
Reviewed by Hugo Parente <hugo.lima@openbossa.org>
Reviewed by Lauro Moura <lauro.neto@openbossa.org>
|
| |\
| | |
| | |
| | |
| | | |
Conflicts:
libshiboken/conversions.h
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
on initShiboken function.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
Reviewer: Lauro Moura <lauro.neto@openbossa.org>
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Value type classes without implicit conversions use the default
implementation provided by ValueTypeConverter. This commit updates
ValueTypeConverter to check for extended conversions, since even a
class without implicit conversions in one module could get some
conversion operators in another.
CppGenerator now writes 'isConvertible' calls to all object and
value types checks leaving the door open to extended conversions.
|
|/ /
| |
| |
| |
| |
| |
| | |
The SbkBaseWrapperType structure now stores pointers to functions
that extend the type Converter methods 'isConvertible' and 'toCpp'.
This is used when a module is extended by another module that defines
a conversion operator for a class in the first module.
|
|/
|
|
|
|
|
|
|
|
|
|
| |
To improve legibility and understanding ConverterBase<T> was renamed
to ValueTypeConverter<T>, and ConverterBase<T*> specialization is
now an independent base converter ObjectTypeConverter<T>.
Converter_CppEnum was renamed to EnumConverter.
The HeaderGenerator and custom converters for the test bindings were
updated accordingly.
Reviewed by Hugo Parente <hugo.lima@openbossa.org>
Reviewed by Lauro Moura <lauro.neto@openbossa.org>
|
|
|
|
|
|
| |
conventions.
Reviewed by Marcelo Lira <marcelo.lira@openbossa.org>
|
|
|
|
|
|
| |
to implement this function (inlining it when needed).
This safe amazings 8KiB from QtGui :-)
|
|
|
|
| |
field in SbkBaseWrapper_Type.
|
| |
|
|
|
|
| |
Reviewed by Hugo Parente <hugo.lima@openbossa.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
When a Python programmer extends a wrapped C++ class the newly created
type must inherit its parent class' special information (e.g. multiple
inheritance casting). The 'new' function for the wrapper meta type
copies the parent information for the extended type.
As it is now the meta type new works properly only with a Python class
inheriting from a single wrapped C++ type.
Reviewed by Hugo Parente <hugo.lima@openbossa.org>
|
|
|
|
|
|
|
|
|
|
|
| |
files.
This is the right way to go, according to:
- http://www.cmake.org/pipermail/cmake/2009-April/028504.html
- http://www.cmake.org/Wiki/CMake_2.6_Notes#Packages
Reviewed by Renato Araújo <renato.filho@openbossa.org>
|
|
|
|
| |
expressions.
|
|
|
|
| |
Reviewed by Hugo Parente <hugo.lima@openbossa.org>
|
|
|
|
|
| |
The conversion of '[const] char*' to C++ now accepts an None object
and gives back a NULL pointer.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Now the user can build new values of a particular enum type passing
an integer to its constructor. Thus, the following C++ code:
MyEnum val = (MyEnum) 1;
is the equivalent of this Python code:
val = MyEnum(1)
The enum unit tests were also updated.
Reviewed by Lauro Moura <lauro.neto@openbossa.org>
|
|
|
|
| |
Reviewed by Marcelo Lira <marcelo.lira@openbossa.org>
|
| |
|
|
|
|
| |
Reviewed by Marcelo Lira <marcelo.lira@openbossa.org>
|
|
|
|
| |
instanciations.
|
|
|
|
|
|
|
| |
This will increase the binding size, so there's an option to disable
verbose error messages. "--disable-verbose-error-messages"
Reviewed by Renato Araújo <renato.filho@openbossa.org> and Marcelo Lira <marcelo.lira@openbossa.org>
|
|
|
|
|
|
| |
To access Sbk*Type variables from other modules, you need to use the array provided via CObjects.
Reviewed by Marcelo Lira <marcelo.lira@openbossa.org>
|
|
|
|
|
|
| |
function.
Reviewed by Lauro Moura <lauro.neto@openbossa.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A mapping to referred objects has been added to the SbkBaseWrapper
structure to keep track of objects used by a given Python
wrapper. This differs from ownership or parenting, since
the referee is not responsible for destroying the
referred object. It is more akin to a model/view relationship
when many views refers to one model but don't own it, and
the model must be kept alive as long it is referred.
Two methods were added to assist the reference keeping:
* SbkBaseWrapper_keepReference
Causes a referred object reference counter to be
increased and any previous used object refcount is
decreased.
SbkBaseWrapper_clearReferences
Decrements the reference counter of all referred
objects. It is called when the Python wrapper referee
is destroyed.
|
|
|
|
|
| |
The same initializations are made in SbkBaseWrapper_TpNew
which is called by SbkBaseWrapper_New.
|
| |
|
|
|
|
| |
Reviewed by Hugo Parente <hugo.lima@openbossa.org>
|
|
|
|
|
|
|
| |
- Flag for types with private destructor
- Cleaning weakrefs in normal destructor
Reviewed by Hugo Parente <hugo.lima@openbossa.org>
|
|
|
|
|
|
| |
For 4 and 5-item tuples
Reviewed by Hugo Parente Lima <hugo.lima@openbossa.org>
|
|
|
|
| |
Reviewer: Renato Filho <renato.filho@openbossa.org>
|