Gustavo J. A. M. Carneiro
73bce2deef
Fix compiler warnings
2008-11-18 14:43:38 +00:00
Gustavo J. A. M. Carneiro
ce804f486a
Python 2.6 fixes
2008-11-18 14:32:45 +00:00
Gustavo J. A. M. Carneiro
7d08ccf1c4
Compare functions by function name first, only after by full declation
2008-11-07 19:17:32 +00:00
Gustavo J. A. M. Carneiro
aee8ad9721
Sort also free functions and namespaces when doing gccxml scanning
2008-11-07 19:07:41 +00:00
Gustavo J. A. M. Carneiro
6a2a1315c1
Clear the container before starting to append items to it
2008-10-16 15:12:58 +01:00
Gustavo J. A. M. Carneiro
a12ae4c5d3
Check for anonymous types when wrapping member variables, and skip them for now, as they cause bad code to be generated.
2008-10-15 18:13:10 +01:00
Gustavo J. A. M. Carneiro
3b21d74c36
Missing wrapper in error handling
2008-10-12 17:47:35 +01:00
Gustavo J. A. M. Carneiro
049fe78ccd
While adding overloaded methods/functions, don't check the PyMethodFlags immediately, check it later, as needed, to allow the programmer a chance to fix the parameters (e.g. default_parameter_type) before code generation.
2008-10-12 14:37:59 +01:00
Gustavo J. A. M. Carneiro
87c2f9d4b1
Don't use 'callable' as parameter name, it is a python builtin function
2008-10-12 13:04:07 +01:00
Gustavo J. A. M. Carneiro
af9c04c88b
Better error messages
2008-10-12 12:09:46 +01:00
Gustavo J. A. M. Carneiro
9c1dcf79df
Don't generate nb_index slot: it is not used yet and breaks compatibility with Python < 2.5
2008-10-07 12:13:05 +01:00
Gustavo J. A. M. Carneiro
3ea77fd1f0
Indent the generated PyNumberMethods struct
2008-10-07 11:31:31 +01:00
Gustavo J. A. M. Carneiro
4c9116b575
Add flag Py_TPFLAGS_CHECKTYPES to type when numeric operators are implemented
2008-10-06 17:33:44 +01:00
Gustavo J. A. M. Carneiro
9e2cf04cec
Need to clear exception when type checking fails
2008-10-06 16:07:41 +01:00
Gustavo J. A. M. Carneiro
259bb357f1
Wrap C++ arithmetic operators
2008-10-06 15:36:44 +01:00
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
169d3c9497
Disable profiling during unit tests (but make it trivial to re-enable)
2008-10-04 22:50:06 +01:00
Gustavo J. A. M. Carneiro
7559f09319
Remove any 'const' from registered containers
2008-10-04 17:44:15 +01:00
Gustavo J. A. M. Carneiro
20b51a7f92
Add a unit test for scanning/wrapping output reference to container parameter (e.g.std::vector<std::string> &outVec)
2008-10-04 17:26:23 +01:00
Gustavo J. A. M. Carneiro
10b347bd76
Fix type normalization function (use the pybindgen own ctypeparser.normalize_type_string function)
2008-10-04 17:25:05 +01:00
Gustavo J. A. M. Carneiro
d26b8f61c4
Now the C type parser removes leading :: from identifiers
2008-10-04 17:22:42 +01:00
Gustavo J. A. M. Carneiro
b73fb06fe0
Fix detection of container types from parameters of type pointer-to-container or reference-to-container
2008-10-04 16:29:50 +01:00
Gustavo J. A. M. Carneiro
bd5d8205c1
Don't leave the type registration order completely undefined; we may want to generate python scripts to become version controlled, and random order leads to spurious diffs as the scanning is done in different machines.
2008-10-02 17:28:14 +01:00
Gustavo J. A. M. Carneiro
32c6811c65
Change the default value of enable_anonymous_containers to True; it has been tested already, and disabling it doesn't really completely fix the cygwin problems.
2008-09-27 15:21:58 +01:00
Gustavo J. A. M. Carneiro
ed7bbebb5a
Fix stl container bad iterator usage in some cases (e.g. std::string).
2008-09-24 17:01:16 +01:00
Gustavo J. A. M. Carneiro
f8b5d2ba03
Scan for containers in class attributes, and assorted fixes
2008-09-15 16:10:36 +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
5c86ea5dfc
Don't use copy.deepcopy; it is buggy on some Python versions.
2008-09-05 16:44:58 +01:00
Mathieu Lacage
b691d94de4
Typo.
2008-09-04 14:09:07 +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
a05fcef850
Adapt example to new API
2008-09-02 11:42:24 +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
9f87c19f90
Add option to disable pygccxml support
2008-08-31 15:04:11 +01:00
Gustavo J. A. M. Carneiro
4e41b8c02e
Scanning of anonymous containers is now disabled by default, due to a bug in gccxml and the problems it causes.
2008-08-29 14:39:43 +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
43b5953208
Now Container takes a container_type parameter instead of add_value_method, to make future tweaking of containers based on type easier and not require more API changes.
2008-08-27 15:39:22 +01:00
Gustavo J. A. M. Carneiro
76c9a1476d
Don't try to read annotations for artificial declarations.
2008-08-27 15:05:17 +01:00
Gustavo J. A. M. Carneiro
424e92557a
typo
2008-08-27 13:05:19 +01:00
Gustavo J. A. M. Carneiro
4302316a3c
Filter out mapping containers for now; use the correct method to add a value for each container type, not always push_back.
2008-08-27 00:18:20 +01:00
Mathieu Lacage
dfc43ab9a6
Add parenthesis to make g++ 4.1 happy when parsing container iterator code.
2008-08-26 22:15:59 +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
a92f6868cc
Add to unit tests APIs involding PyObject*, in order to test this type handler
2008-08-20 21:37:05 +01:00
Gustavo J. A. M. Carneiro
3c15d022a9
Add unit tests, fix a C++ object refcount leak.
2008-08-20 15:26:33 +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
20d58453b1
Default value for tp_dictoffset should be 0, not NULL.
2008-08-19 12:44:43 +01:00
Gustavo J. A. M. Carneiro
72da33c8c4
Missing typecast to PyObject in Py_VISIT argument.
2008-08-19 12:34:55 +01:00