Commit Graph

7 Commits

Author SHA1 Message Date
Sebastien Binet 55c408dc44 bind: handling of private fields in struct.tp_init
Previously, the tp_init function being generated for a struct would try to fill
private fields from the args passed to __init__.
This obviously breaks Go's encapsulation mechanism.

Only allow public fields to be initialized from __init__.
Add a test.

Fixes #52.
2015-08-31 18:40:47 +02:00
Sebastien Binet c1d3b45735 bind: first stab at a gopy object model 2015-08-14 13:04:35 +02:00
Sebastien Binet df2b8858f4 bind: leverage new genFunc
Change-Id: I79b0ec59dba91948a56fdd3d6a00801f9df0effd
2015-08-11 17:32:51 +02:00
Sebastien Binet 1bca59ae15 bind: support for empty structs
Fixes #39.

Change-Id: Id7e8708ceb331dcac79a7738b108e18f729c1e96
2015-08-11 13:46:38 +02:00
Sebastien Binet cadb7c02b1 bind: check arg-types for type-setters
Fixes #16.

Change-Id: Ib391eaf674acf8d3f4fef486022dcb1edeaaf94f
2015-08-10 19:23:09 +02:00
Sebastien Binet ae337a6693 bind: support for kwargs for struct.__init__
Fixes #6.

Change-Id: Ia8902069a93713181c9df83571b11b034d01bc87
2015-08-10 18:01:39 +02:00
Sebastien Binet 03c7549090 bind: support for buffer-protocol
Change-Id: Ib504fd3d4e70ba32076f62858ff73ec11e34eb52
2015-08-05 15:32:41 +02:00