| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
Reviewer: Hugo Parente Lima <hugo.lima@openbossa.org>,
Luciano Wolf <luciano.wolf@openbossa.org>
|
| |
|
|
|
|
|
| |
The method now checks native code injections instead of only target
language code.
|
|
|
|
|
|
|
| |
This method tries to build an AbstractMetaType from a string, it is
used by guessCPythonCheckFunction to better handle type replacements
identifying types already known by the type database for the currently
generated, instead of treating said replacements as mere blobs.
|
|
|
|
|
|
|
|
| |
ShibokenGenerator got the methods:
* QString extendedIsConvertibleFunctionName(TypeEntry*)
Returns the name of an extended "isConvertible" function.
* QString extendedToCppFunctionName(TypeEntry*)
Returns the name of an extended "toCpp" function.
|
|
|
|
|
|
| |
It returns all types from a previous module that could be generated
by a conversion operator defined in the current module, as well as
all the possible arguments for the conversion.
|
|
|
|
| |
The new method returns a flat list of all the given class' ancestors.
|
|
|
|
|
|
| |
AbstractMetaType.
This is needed by hash function writer.
|
| |
|
|
|
|
|
|
|
| |
It checks if an AbstractMetaType represents a C++ pair container.
Also updated code to make use of the new method.
Reviewed by Lauro Moura <lauro.neto@openbossa.org>
|
|
|
|
|
| |
It checks if an AbstractMetaType represents a C string.
Also updated code to make use of the new method.
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
The new expressively named methods hasMethodsWithReferenceCountModifications
and needsReferenceCountControl returns boolean values to help generation
of code for reference counting support.
|
|
|
|
|
|
|
| |
Added the following self evident methods to ShibokenGenerator:
* QString cpythonGettersSettersDefinitionName(const AbstractMetaClass*);
* QString cpythonGetterFunctionName(const AbstractMetaField*);
* QString cpythonSetterFunctionName(const AbstractMetaField*);
|
|
|
|
| |
Reviewed by Renato Araújo <renato.filho@openbossa.org>
|
|
|
|
| |
Reviewed by Marcelo Lira <marcelo.lira@openbossa.org> and Renato Araújo <renato.filho@openbossa.org>
|
|
|
|
|
|
|
| |
If the method returns a pointer and there are no policies for the return type, the returned value is
considered child of the current object (self).
Reviewed by Renato Araújo <renato.filho@openbossa.org>
|
|
|
|
| |
Reviewed by Marcelo Lira <marcelo.lira@openbossa.org>
|
|
|
|
| |
Reviewed by Hugo Parent <hugo.lima@openbossa.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
These are the methods added to ShibokenGenerator:
* classNeedsGetattroFunction(metaClass)
Returns true if a tp_getattro function should be generated for the
given class. At the moment the only criteria is that the class
has an overload with both static and non-static versions of a method.
* getMethodsWithBothStaticAndNonStaticMethods(metaClass)
Returns a list of methods of the given class where each one is part
of a different overload with both static and non-static method.
* cpythonMethodDefinitionName(metaFunc)
Returns the name of a method definition (a single method, i.e.
a PyMethodDef struct) for a given method.
* cpythonGetattroFunctionName(metaClass)
Returns the name of a 'tp_getattro' method for a given class.
|
|
|
|
| |
Reviewed by Hugo Parente Lima <hugo.lima@openbossa.org>
|
|
|
|
|
| |
Generated code now makes use of the new convenience classes instead
of directly using the Python provided PyGILState_STATE and PyThreadState.
|
|
|
|
|
|
|
|
|
|
| |
The code to write the definition of cppSelf was in two places and
contained an #ifdef clause, now it is a writer method.
Also added the ShibokenGenerator::cppSelfVariableName() method
to be used instead of directly writing the "cppSelf" string.
Updated custom code on test binding to remove warning.
Reviewed by Hugo Parente Lima <hugo.lima@openbossa.org>
|
|
|
|
|
|
|
| |
It checks if a meta type should be dereferenced by the Python method
wrapper passing it to C++.
ShibokenGenerator::shouldDereferenceArgumentPointer now calls the new
method.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
The previous behaviour was to pass the result, if any, straight to
the to-Python-converter method. Separating the C++ from the Python
part allows us to release the thread lock when calling C++ and taking
it back before calling the converter filled with Python calls.
Also renamed "retvalVariableName()" to the more meaninful name
"pythonReturnVariableName()" and added "cppReturnVariableName()".
Also updated the type system variable replacement to recognize "%0" as
"cppReturnVariableName()".
|
|
|
|
| |
parameter.
|
|
|
|
|
|
|
| |
A NULL pointer in the "lastArg" parameter of writeCodeSnips means that
the function being processed will be called without arguments. The
behavior prior to this change was that a NULL lastArg indicates that
all arguments are to be used.
|
|
|
|
|
|
|
|
|
|
| |
You need to enable these extensions if you are generating a binding for a Qt-based library
and need to pass some types through the signal slots mechanism.
If you turn this flag on, you also need to link the generated bindings with the
libpyside, besides add libpyside include path to your project.
Reviewed by Marcelo Lira <marcelo.lira@openbossa.org>
|
| |
|
|
|
|
| |
modifications.
|
|
|
|
| |
Reviewed by Hugo Lima <hugo.lima@openbossa.org>
|
|
|
|
| |
Reviewed by Marcelo Lira <marcelo.lira@openbossa.org>
|
| |
|
|
|
|
|
|
| |
Added cpythonIsConvertibleFunction(const AbstractMetaType*) to
ShibokenGenerator to generate "isConvertible" checks that adds
the pointer sign '*' to value pointers and object types.
|
|
|
|
|
| |
When enabled, this heuristic will check every constructor for an argument named "parent",
if the argument is a pointer, then it'll be the parent of this object.
|
|\ |
|
| |
| |
| |
| |
| | |
which returns a boolean indicating if there are cases of multiple inheritance
in any of its ancestors.
|
| |
| |
| |
| |
| | |
return an AbstractMetaClassList (AbstractMetaClass does not
provide such a method)
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
now receive the multiple inheritance information, the initialization
function will be that of the first ancestor that have multiple
inheritance.
Example:
class MDerived : public Base1, public Base2
clas SonOfMDerived : public MDerived
MDerived defines the function PyMDerived_mi_init to register the
multiple inheritance information, and SonOfMDerived just uses the
ancestor function.
|
| | |
|
| |
| |
| |
| |
| | |
Used only by boostpythongenerator and remained untouched after the
Shiboken fork.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
ShibokenGenerator, it returns true if a code injection
on a virtual method override (a "native" inject-code) does
a call to the Python override.
Added the %PYTHON_METHOD_OVERRIDE type system variable,
it is replaced by the name of the pointer to a Python
method that represents an override to a C++ virtual method.
A code injection in the "native/end" position for a method
modification is now put before the dereferencing of the
variables used in the Python call (the method object and
the Python argument tuple).
If a call to the Python override method is detected on
code injections of the "native" class from method
modifications, the generator doesn't write the same
call again.
All documentation was updated with the changes.
|
| |
| |
| |
| |
| |
| |
| | |
if the user injected code uses the "%PYSELF" type system variable.
This is useful to provide the Python wrapper pointer to native
method code injections.
Also updated the documentation comment for injectedCodeUsesCppSelf.
|
| |
| |
| |
| |
| |
| | |
that checks if a function returning 'void' needs to have the Python method
wrapper return value set to Py_None. This happens when any of the other
overloads for the function return type is different from 'void'.
|
|/
|
|
|
|
|
|
|
| |
AbstractMetaArgument indicating the last C++ argument available
(i.e. converted from Python arguments to C++) to be used in the
type system variable replacement. If a variable in the user's
custom code is not ready, it is replaced by the argument default
value.
Also updated the documentation.
|
|
|
|
|
|
|
|
|
| |
by the proper Python type object depending on the context: method
or class modification. Also added an AbstractMetaClass argument
to ShibokenGenerator::writeCodeSnips to pass the needed context
information.
Reviewd by Luciano Wolf <luciano.wolf@openbossa.org>
|
|
|
|
| |
Reviewed by Marcelo Lira <marcelo.lira@openbossa.org>
|
|
|
|
|
|
| |
AbstractMetaFunction; one tells if the function uses the %CPPSELF
type system variable on its code snippets (if any), and the other
says if there is a call to the wrapped C++ function in the code snippets
|