Sebastien Binet
2f34f14535
bind: cosmetics
...
Change-Id: I6f223468cb4b9614b749e60bca041e58e2518ff9
2015-08-03 14:24:10 +02:00
Sebastien Binet
00ab8b2506
all: add copyright headers
...
Change-Id: Ia0cebb003a350b753766dd26887fcd63e83b0d46
2015-08-03 14:23:00 +02:00
Sebastien Binet
d9a04c9f10
test: poor man's test of x-ref GC
...
Change-Id: I674eb89abd2bdc1b4f2505974b6223ec9a19f79d
2015-08-03 13:24:48 +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
a1e9c1317a
bind: more tests for Couple
2015-07-31 17:13:45 +02:00
Sebastien Binet
0434b8d446
bind: handle func taking other pkg-local types
2015-07-31 17:13:31 +02:00
Sebastien Binet
64de09f092
bind: test top-level vars+consts
2015-07-31 16:54:24 +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
6cd8c71b94
bind: groundwork+test for structs with struct values
2015-07-30 16:06:31 +02:00
Sebastien Binet
84e83328f8
bind: remove panic for unsupported objects
2015-07-30 16:05:45 +02:00
Sebastien Binet
c8787de724
bind: cgo-cosmetics
2015-07-30 16:04:46 +02:00
Sebastien Binet
0feb50a4bc
bind: better handling of wrapping for nested structs
2015-07-30 16:04:26 +02:00
Sebastien Binet
405ce0ee56
bind: test for exception type
2015-07-29 17:46:02 +02:00
Sebastien Binet
404911b545
bind: raise TypeError in __init__
2015-07-29 17:41:37 +02:00
Sebastien Binet
1d5a0689b9
bind: test ctors
2015-07-29 17:32:51 +02:00
Sebastien Binet
04b64b62d3
bind: add support for ctors
2015-07-29 17:27:54 +02:00
Sebastien Binet
7fa9bcd9cd
test: add ctor with comma-err
2015-07-29 16:57:53 +02:00
Sebastien Binet
79e0e447cb
test: add another ctor for hi.Person
2015-07-29 16:54:44 +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
a3bdde49c1
bind: test comma-err pythonization
2015-07-29 14:50:02 +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
44abf5c71e
bind: test exception support
2015-07-29 14:15:31 +02:00
Sebastien Binet
3a6a959550
bind: first stab at exception support
2015-07-29 14:15:11 +02:00
Sebastien Binet
59a16dec60
bind: test __repr__
2015-07-29 12:37:32 +02:00
Sebastien Binet
7d90f62f3c
bind: fix mangling of methods
2015-07-29 12:37:20 +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
36d61b0c8e
test: add method returning an error
2015-07-29 11:57:51 +02:00
Sebastien Binet
d6d6d01ece
bind: test getter/setter
2015-07-29 11:44:37 +02:00
Sebastien Binet
ba3a48a31b
bind: leaner Var
2015-07-29 11:44:06 +02:00
Sebastien Binet
10e80de3df
bind: correctly handle int/uint size and pyfmt for PyArg_Parse
2015-07-29 11:43:31 +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
c311fdd9be
bind: generate cgo-setter
2015-07-29 11:38:50 +02:00
Sebastien Binet
ce3515391b
bind: fix shared buffer bug
2015-07-29 08:42:23 +02:00
Sebastien Binet
c8358845a8
bind/printer: impl io.Reader + test
2015-07-29 08:36:45 +02:00
Sebastien Binet
85a8808e45
bind: document Signature
2015-07-28 16:06:34 +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
76f5f7d999
bind/var: introduce new Var
2015-07-28 16:00:18 +02:00
Sebastien Binet
a9624ab5da
bind/package: add lookup function
2015-07-28 14:41:53 +02:00
Sebastien Binet
bbb9499368
bind/types: Obj() -> GoObj()
2015-07-28 14:41:35 +02:00
Sebastien Binet
a083052bf6
bind/utils: helper to check wether a func is 'func String() string'
2015-07-28 14:35:59 +02:00
Sebastien Binet
0058490f51
bind: split Type into Type+Object
2015-07-28 14:33:47 +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
76c536b4e8
bind/types: introduce bind.Type interface
2015-07-28 12:26:33 +02:00