Commit Graph

36 Commits

Author SHA1 Message Date
Sebastien Binet 1a168b8968 bind: generate converters for all basic types 2015-08-05 19:08:41 +02:00
Sebastien Binet 9b92f7de5d bind: declare/implement converters for basic types
Change-Id: If570b3d119a1ee8e7288915a4db8e4b18b6285ea
2015-08-05 17:40:41 +02:00
Sebastien Binet 03c7549090 bind: support for buffer-protocol
Change-Id: Ib504fd3d4e70ba32076f62858ff73ec11e34eb52
2015-08-05 15:32:41 +02:00
Sebastien Binet 58ae68958f all: wire in cpython API version
Change-Id: Ic09f7face9a7d65220474eb62a1a5dfe09d9d4cf
2015-08-05 14:13:37 +02:00
Sebastien Binet 114a95e0ba bind: add __str__ support for all types
Change-Id: I08693a03f232fe1d8e91233f5e40d1dcdad6e316
2015-08-05 11:34:16 +02:00
Sebastien Binet a03b288886 bind: expose all public types to python module
Change-Id: I948838b37f0d5f909ae58797930ffe598dc539ca
2015-08-05 10:32:38 +02:00
Sebastien Binet 25b6e3cea7 bind: cosmetics
Change-Id: I40496f9ddfee85ef80925f1f425e19ffdd698eba
2015-08-05 10:31:57 +02:00
Sebastien Binet b585eb28a1 all: cleanups + consolidation
Change-Id: I0d780b20aaa8f70930df4df145c798148edf4907
2015-08-05 09:22:56 +02:00
Sebastien Binet 70592452c9 all: rationalize naming convention. consolidate symtable+symbol
Change-Id: Id3090d5d9ff71b9c96dc707a73ee1af4516cf547
2015-08-05 09:22:56 +02:00
Sebastien Binet 94f02af665 bind: first stab at supporting arrays 2015-08-05 09:22:56 +02:00
Sebastien Binet a99ff84105 bind: support for cross-ref gc
This CL implements a ref-counting scheme for go values passed to the python
world.
Go values (actually, their unsafe.Pointer) are associated with a reference
counter as soon as they exit the Go world.
These values are also pinned inside a global map to prevent the GC from moving
them around.
Conversely, python objects wrapping Go values will decrease the reference
counter when the __del__ method is called.

Fixes #7

Change-Id: I9b6434d0933b7abe409ac130f3a8c0655c1f23a9
2015-08-03 13:19:49 +02:00
Sebastien Binet ac4e49ddfb bind: initial support for top-level values
Fixes #8
2015-07-31 16:53:15 +02:00
Sebastien Binet 0ad90a1a6b bind: create converters for structs, booleans and GoStrings 2015-07-31 16:51:30 +02:00
Sebastien Binet d9d855f797 bind: initial support for top-level consts
Fixes #10
2015-07-31 10:13:25 +02:00
Sebastien Binet 0feb50a4bc bind: better handling of wrapping for nested structs 2015-07-30 16:04:26 +02:00
Sebastien Binet 404911b545 bind: raise TypeError in __init__ 2015-07-29 17:41:37 +02:00
Sebastien Binet 04b64b62d3 bind: add support for ctors 2015-07-29 17:27:54 +02:00
Sebastien Binet b08c745bd9 bind: expose ctors at module level. fix ctors doc extraction 2015-07-29 16:54:26 +02:00
Sebastien Binet 510ce98f9a bind: pythonize func/meth that return an error
fixes #5
2015-07-29 14:48:55 +02:00
Sebastien Binet 3a6a959550 bind: first stab at exception support 2015-07-29 14:15:11 +02:00
Sebastien Binet 0e8433de87 bind: cleanup 2015-07-29 12:37:03 +02:00
Sebastien Binet 6930d747dd bind: fwk for protocols. impl __str__ 2015-07-29 12:36:45 +02:00
Sebastien Binet 0bb7490204 bind: cleanups 2015-07-29 11:42:40 +02:00
Sebastien Binet 4a098ea7a8 bind: implement getter/setter cpy-wrappers 2015-07-29 11:42:14 +02:00
Sebastien Binet 335cdf609f bind: new-signature, simplify genXYZFunc 2015-07-29 11:41:17 +02:00
Sebastien Binet 1ca803e2e5 bind: simplify bind.Object interface 2015-07-28 16:03:39 +02:00
Sebastien Binet 643eb176c2 bind: introduce and use new Signature 2015-07-28 16:01:22 +02:00
Sebastien Binet bbb9499368 bind/types: Obj() -> GoObj() 2015-07-28 14:41:35 +02:00
Sebastien Binet 6c3787c30d bind/types: extend Type interface. rationalize GoType() meaning 2015-07-28 12:38:11 +02:00
Sebastien Binet 8e5e4531bf bind: consolidate bind.{Struct,Func}. impl bind.Type interface 2015-07-28 12:27:15 +02:00
Sebastien Binet f61b769412 all: consolidate Func+Method 2015-07-28 11:47:55 +02:00
Sebastien Binet 43f0028eb5 bind: refactor gen{Method,Func}Body 2015-07-28 10:04:36 +02:00
Sebastien Binet 63da525aa1 bind: test hi.Person.Greet + doc(hi.Person.Greet) 2015-07-27 18:57:27 +02:00
Sebastien Binet 3be107f119 bind: introduce Struct, Func and Method
this CL introduces bind.{Struct,Func,Method} types to collect informations
about types.

- rationalize cpython type strings
- generate cgo stub functions, calling structs methods
- generate (invalid) bodyless cpython functions for struct methods
2015-07-27 18:47:18 +02:00
Justin Israel 06ec70c37d gencpy: generate and insert function signatures at start of docstring 2015-07-25 09:15:26 +02:00
Sebastien Binet 744ab46aef all: gopy-gen -> gopy 2015-07-24 16:16:31 +02:00