Gustavo J. A. M. Carneiro
b0336e7f06
Getting ready to support numeric operators...
2008-10-05 18:51:17 +01:00
Gustavo J. A. M. Carneiro
dad9e231b8
Add support for wrapping binary comparison operators
2008-10-04 22:52:39 +01:00
Gustavo J. A. M. Carneiro
21967a7371
Fix a std::map wrapper registry--erase the same key twice--that caused problems in win32 (mingw)
2008-09-09 12:09:30 +01:00
Gustavo J. A. M. Carneiro
8126ba895a
python 2.4 + gcc 4.2 fix
2008-09-04 14:07:52 +01:00
Gustavo J. A. M. Carneiro
30bfe7c371
If generating output string stream operator for a class, add the dependency includes <ostream> and <sstream> to the module
2008-09-03 11:59:10 +01:00
Gustavo J. A. M. Carneiro
a143441eac
Revamp type matching system and const handling, is_const becomes deprecated.
...
Now types are specified with consts inside the type string, is_const is deprecated. The ctypeparser utility module, previously only used to canonicalize type strings, is used more extensively throughout pybindgen to provide type traits and type manipulation, where needed. gccxml type traits no longer used as consequence.
2008-09-02 11:06:24 +01:00
Gustavo J. A. M. Carneiro
992e902fad
Let's face it: generating tp_hash was just a hack; disabled because it's no longer needed.
2008-08-27 15:43:58 +01:00
Gustavo J. A. M. Carneiro
5877205b99
Add optional 'wrapper registry' support, which allows one-to-one mapping between C++ object and Python wrapper, so that two wrappers can be safely compared with the 'is' operator.
2008-08-22 15:44:35 +01:00
Gustavo J. A. M. Carneiro
02bbd782a8
Only enable the copy constructor if is public.
2008-08-19 15:27:12 +01:00
Gustavo J. A. M. Carneiro
d09c8ac15f
Generate __copy__ methods to allow copy.copy() to work on our class wrappers.
2008-08-19 15:18:54 +01:00
Gustavo J. A. M. Carneiro
311f18b98d
Fix missing copy constructor that was not being generated into the python script. Add utility method to easily add a copy constructor to a class.
2008-08-19 14:39:50 +01:00
Gustavo J. A. M. Carneiro
c00f408eb4
Add tp_call support to the python API; corresponding gccxml support is TODO.
2008-08-12 15:52:49 +01:00
Gustavo J. A. M. Carneiro
ff031bfcda
Factor out the generation of the type structure away from cppclass into a separate class PyTypeObject, for better code reuse.
2008-08-08 18:54:21 +01:00
Gustavo J. A. M. Carneiro
3f8b90adba
Generate tp_hash for CppClass
2008-08-01 22:15:49 +01:00
Gustavo J. A. M. Carneiro
13b6dc02e0
Bug #247059 : API to wrap inner enums and classes is not intuitive
2008-07-27 17:00:41 +01:00
Gustavo J. A. M. Carneiro
0ef71e5c86
Generate #include <typeinfo> if we're about to use typeid() operator
2008-07-25 19:32:10 +01:00
Gustavo J. A. M. Carneiro
2ebd5eafbe
Fix reference counting problem, triggered by subclass-able class not being subclassed, which is detected only by a debug Python build.
2008-07-22 16:31:08 +01:00
Gustavo J. A. M. Carneiro
c54893328a
Python 2.3 compatibility fixes
2008-07-22 16:30:01 +01:00
Gustavo J. A. M. Carneiro
423e0a1110
Mark deprecated incref_method, ... parameters in the documentation
2008-07-20 22:37:31 +01:00
Gustavo J. A. M. Carneiro
aecd0d581f
Fix stupid bugs in handling of memory_policy assertions and inheritance logic
2008-07-20 22:30:35 +01:00
Gustavo J. A. M. Carneiro
caf2f7fb91
Make CppClass parameter memory_policy slightly less restrictive (allow subclass to define memory_policy as long as no parent class has defined it before).
2008-07-20 19:44:14 +01:00
Gustavo J. A. M. Carneiro
6137f3916f
Fix some more deprecations
2008-07-20 19:26:00 +01:00
Gustavo J. A. M. Carneiro
08e6d918d4
New cppclass.MemoryPolicy and memory_policy CppClass parameter. Closes Bug #247536 (CppClass: improve consistency of memory management parameters).
2008-07-18 19:24:38 +01:00
Gustavo J. A. M. Carneiro
ceb4b9c2fe
Split the cppclass.py file, as it was getting too big: move type handlers into new source file cppclass_typehandlers.py.
2008-07-18 16:40:33 +01:00
Gustavo J. A. M. Carneiro
f3a0c9a33c
Module.add_typedef API, implemented only for C++ classes/structs for now.
2008-07-15 00:28:58 +01:00
Gustavo J. A. M. Carneiro
c10f5b9e2e
Add default_value_type option to CppClassRefParameter. When used, code to handle default paraameters is generated using a temporary variable to hold the default parameter, instead of an expression. Unfortunately default_value_type cannot yet be introspected by the gccxml scanner.
2008-07-13 17:50:52 +01:00
Gustavo J. A. M. Carneiro
b47d59ac20
Ensure we do not generate helper class for classes with subclassing disabled
2008-07-13 15:27:51 +01:00
Gustavo J. A. M. Carneiro
a7341fe7ea
Clarify the custodian parameter of CppClassPtrParameter and CppClassPtrReturnValue
2008-07-11 11:31:25 +01:00
Gustavo J. A. M. Carneiro
a351d1490a
Documentation typo (thanks Mathieu)
2008-07-10 12:09:59 +01:00
Gustavo J. A. M. Carneiro
da8b7c17ed
Fixing bug #246069 , did some bug fixing along the way (related to virtual method parent callers), before discovering the bug was invalid.
2008-07-09 11:30:36 +01:00
Gustavo J. A. M. Carneiro
bfbfcbdefe
Fix protected constructor issues.
2008-07-06 15:53:04 +01:00
Gustavo J. A. M. Carneiro
b809e6c15a
Don't even try to generate code for CppDummyMethod's, they were never meant to generate code.
2008-07-06 14:54:23 +01:00
Gustavo J. A. M. Carneiro
e1f813d97e
Generate a tp_richcompare slot function for each type. For the time being it simply raises TypeError, just to avoid the trap of comparing objects when the default evil Python 2.x behaviour is to compare by wrapper pointer value. In the future, wrapping C++ comparison operators will be possible.
2008-07-06 12:57:37 +01:00
Gustavo J. A. M. Carneiro
8a890c4875
CppClass.add_output_stream() documentation and unit tests.
2008-07-02 11:32:02 +01:00
Gustavo J. A. M. Carneiro
a2068d0789
s/operator_os/output_stream_operator/ (more readable)
2008-07-02 10:52:29 +01:00
Mathieu Lacage
afbc756be3
Add support for scanning for output stream operator functions, and wrap them as tp_str of each class.
2008-07-02 10:45:56 +01:00
Gustavo J. A. M. Carneiro
fe261114bc
CppClassRefParameter should check if class is constructible only when the parameter has a default value.
2008-06-30 15:24:03 +01:00
Gustavo J. A. M. Carneiro
285f9f3d68
Experimental multi-section (split generated C code over multiple files) code
2008-06-24 01:23:54 +01:00
Gustavo J. A. M. Carneiro
097b990eb0
missing const_casts; typo
2008-06-15 15:00:24 +01:00
Gustavo J. A. M. Carneiro
7d5b1ebff1
Define stack_where_defined much earlier
2008-06-08 22:15:42 +01:00
Gustavo J. A. M. Carneiro
fc23042b8e
Add a 'stack_where_defined' to all added wrappers; this way it is possible, in the error handler, to tell the user exactly where is the code that causes the failure.
2008-06-08 22:02:42 +01:00
Gustavo J. A. M. Carneiro
d4d5e80e00
[bug #237524 ] Avoid using const_cast and reinterpret_cast, use C-style casts instead, so that the generated code compiles with a pure C compiler.
2008-06-06 12:39:05 +01:00
Gustavo J. A. M. Carneiro
d85131349a
Guard against code generation errors while adding a method object
2008-06-02 18:06:46 +01:00
Gustavo J. A. M. Carneiro
884091cce6
Add the dummy methods to helper classes as well, so that unwrapped pure virtual methods are detected and the helper class disabled
2008-05-25 21:43:38 +01:00
Gustavo J. A. M. Carneiro
c375b5b878
Delayed binding of parameter and return value specifiers, and improved error handling.
2008-05-25 19:53:38 +01:00
Gustavo J. A. M. Carneiro
0495cc26f8
Filter out duplicated helper class constructors
2008-05-24 15:26:00 +01:00
Gustavo J. A. M. Carneiro
ca9cafaeec
Remove a couple of FIXME exceptions
2008-05-23 19:10:33 +01:00
Gustavo J. A. M. Carneiro
8ff41f247c
Add virtual methods from parent classes for each class' helper class
2008-05-22 18:28:47 +01:00
Gustavo J. A. M. Carneiro
8834c97ff0
Avoid generating code that doesn't compile, when dealing with a combination of implicit conversions + abstract classes
2008-05-22 16:23:44 +01:00
Gustavo J. A. M. Carneiro
07a7701fcf
CppClass.add_*_attribute API change.
2008-05-19 16:55:50 +01:00