4f28e14a1b
implement C++ class static attribute through a metaclass rather than descriptor; unfortunately static attribute setters are still not working for some reason.
Gustavo J. A. M. Carneiro2007-06-16 17:38:42 +01:00
094d666b28
Add code for static attribute setters, which unfortunately doesn't work due to Python limitations :-(
Gustavo J. A. M. Carneiro2007-06-10 23:43:30 +01:00
648cebc03b
Use the new ReturnValue.value attribute, instead of #define retval ... #undef hacks.
Gustavo J. A. M. Carneiro2007-06-10 15:06:49 +01:00
98d2ac9a10
Define a 'value' attribute in ReturnValue objects, and use it instead of the hardcoded 'retval' variable name.
Gustavo J. A. M. Carneiro2007-06-10 15:05:44 +01:00
96989183b8
Fix Parameter implementations to use self.value instead of self.name where appropriate.
Gustavo J. A. M. Carneiro2007-06-10 14:00:47 +01:00
9dbfcfe7a1
Simplify set/get_value/lvalue. It's becoming way too complicated, and not possible to guarantee correct code. Better just to have a simple 'value' attribute for now, defaulting to the parameter name.
Gustavo J. A. M. Carneiro2007-06-10 12:28:46 +01:00
0e2de63d05
Make CodeBlock have an associated DeclarationsScope, so that you can call declare_variable on it. Add [gs]et_l?value() methods to Parameter, to dissociate the value/lvalue of a parameter from its name. Actual type handlers still need to be fixed, though.
Gustavo J. A. M. Carneiro2007-06-09 22:18:21 +01:00
f5bd95cde5
Add CodeBlock.indent/unindent methods (simple proxies to the code sink methods).
Gustavo J. A. M. Carneiro2007-06-09 14:45:14 +01:00
2db5dee8ef
Don't delete self->obj in the destructor if no usable constructor exists; prevents compilation error with singleton classes and private destructor.
Gustavo J. A. M. Carneiro2007-06-07 19:17:05 +01:00
588f2fd885
Refactor class registration and generation; fix C++ static attribute getter to make it work from the class itself.
Gustavo J. A. M. Carneiro2007-06-07 18:14:33 +01:00
f8aed4cece
API for wrapping C++ instance and static attributes; implement getter for instance attribute; getter for static attributes not fully working yet. None of the setters implemented.
Gustavo J. A. M. Carneiro2007-06-07 17:14:07 +01:00
f57af0bd74
Make sure the method flags are correct even when parameters added in write_method_call.
Gustavo J. A. M. Carneiro2007-06-06 18:02:51 +01:00
4dc92b7874
Small refactoring of ForwardWrapperBase.generate_body to allow the generate_call() virtual method to add new parse parameters that were not previously declared.
Gustavo J. A. M. Carneiro2007-06-06 17:37:57 +01:00
863b69908b
add assertion to detect when one constructor parameter is missing a name; add option to force forward wrappers to use PyArg_ParseTuple or PyArg_ParseTupleAndKeywords
Gustavo J. A. M. Carneiro2007-06-06 14:20:21 +01:00
972e18f122
Fix the type transformations API, implement transformations for C++ class pointer types, and add example.
Gustavo J. A. M. Carneiro2007-06-04 22:13:10 +01:00
6d131c4598
API change, to prepare for type handler transformations: Parameter('ctype', ...) becomes Parameter.new('ctype', ...), idem for ReturnValue.
Gustavo J. A. M. Carneiro2007-06-04 16:41:33 +01:00
e6949fb84e
Add missing destructor in SomeObject; fixes all memory leaks reported by valgrind.
Gustavo J. A. M. Carneiro2007-06-04 14:36:13 +01:00
56958cd448
Add a new pybindgen.write_preamble() API, to write the #include <Python.h> and some other stuff needed to compile with Python < 2.5.
0.3.0
Gustavo J. A. M. Carneiro2007-06-03 23:09:11 +01:00
9275eb01ef
make the void return type not return an explicit Py_None, to prevent a bug hwere None is being returned as first element of tuple when there are out/inout parameters
Gustavo J. A. M. Carneiro2007-06-03 22:31:34 +01:00
65cc53d115
implement pass class object by reference (one test case failing atm due to another bug)
Gustavo J. A. M. Carneiro2007-06-03 22:15:43 +01:00
1bfa64cf63
Refactor class methods to make them independent from the class until generation time.
Gustavo J. A. M. Carneiro2007-06-03 15:07:18 +01:00
6df424d054
fix the 'extra version' number; it should be the last revision, not the revision corresponding to the last tag.
Gustavo J. A. M. Carneiro2007-06-03 14:43:41 +01:00
eebacb19cb
Add example interfaces to test a bunch of new stuff (c++ subclassing, class parameter handling)
Gustavo J. A. M. Carneiro2007-06-03 14:38:40 +01:00
67843fa924
refactor the build system to avoid generating .py[co] files in the source tree (which WAF doesn't like)
Gustavo J. A. M. Carneiro2007-06-02 15:02:23 +01:00
6f3dfc94a7
Simplified parameter/return value type handler instantiation, via special __new__ methods.
Gustavo J. A. M. Carneiro2007-05-31 14:34:28 +01:00