Sebastien Binet
0063d38cf4
all: copy+use cpy-seq support code into wrapping package
2016-01-06 09:20:08 +01:00
Sebastien Binet
aace95d243
bind/_cpy: more flesh to the cpy-seq support library
...
Change-Id: I8cb6810530a708e578b900f64b3be000924f746f
2016-01-06 09:20:08 +01:00
Sebastien Binet
ae90a6458d
bind: register func proxies with bind/seq
2016-01-06 09:20:08 +01:00
Sebastien Binet
bd61d900a8
bind,seq: checkpoint
...
Change-Id: Ibb3cca77e6fd0061f1c841d83d398f646d674c2b
2016-01-06 09:20:08 +01:00
Sebastien Binet
118327cb0d
bind: first stab at x/mobile/bind/seq support
...
Change-Id: Ib21ad4f819efd3c3631c5f8807ac12db126ee88d
2016-01-06 09:20:08 +01:00
Lance Hartung
b5e44cd754
Increment reference count for results in genMethodBody.
2016-01-04 15:33:53 -06:00
Sebastien Binet
c3392d2400
doc: add link to GopherAcademy blog post
2015-12-19 19:10:19 +01:00
Sebastien Binet
6984e5b932
travis: use go-1.5.2. temporarily drop go-tip
2015-12-19 19:06:48 +01:00
Maxim Kupriianov
bc0afa95ca
Minor fixes in docker case docs.
2015-12-16 16:19:30 +01:00
Maxim Kupriianov
0fe3fd5dd1
Docs for docker image.
2015-12-16 16:19:30 +01:00
Maxim Kupriianov
a6fef9b425
Add Dockerfile to support docker builds.
2015-12-16 16:19:30 +01:00
Sebastien Binet
03fb67b90e
doc: add links to gopy-slides + go-version requirements
...
Change-Id: Ifb1ee0d8b2871baedf65b495981070a54699a0d8
2015-11-16 13:47:36 +01:00
Sebastien Binet
90f5fcd36e
gopy: load from export data, not source
...
This CL, inspired from https://golang.org/cl/16911 , drops the use of
`x/tools/go/loader` (importing from sources) and replaces it with the stdlib
`go/importer`, working off the (binary) exported data under
$GOPATH/pkg/pkgname.a.
This allows us:
- to rely completely on the stdlib-1.5,
- to support cgo-based packages (which are not supported by `x/tools/go/loader`)
Fixes #28
Fixes #36
Fixes #68
Fixes #70
Change-Id: I0321645dfeec8738687a675a7e80283053c89123
2015-11-16 13:37:00 +01:00
Sebastien Binet
6403bdc659
gopy: fix typo
...
Change-Id: I1172b592b6ed4d0c7a42fb93195871fc36aaddb5
2015-11-16 13:00:41 +01:00
Sebastien Binet
e44991867d
all: use go/types from stdlib-1.5
...
Updates #28 .
Change-Id: Id56c7ea1257086f819f466a0f058f34dc038fd9b
2015-11-16 12:54:02 +01:00
Sebastien Binet
ba077dc42a
travis: add 1.5.1, tip
...
Change-Id: I2f925dd2b38ee30ccb979022f111ac152366bde1
2015-09-17 12:22:58 +02:00
Sebastien Binet
1982706899
doc: update gopy help
...
Change-Id: If2ae7e996c6d68be3b5940fe26f0f8820d41237a
2015-09-11 14:40:47 +02:00
Sebastien Binet
c4d5a9cd7c
gopy: harmonize default py-version for gopy cmds
...
Fixes #66 .
Change-Id: I6f9f535c5a78c2e26d3c7f386999505c0339815c
2015-09-11 08:26:37 +02:00
Sebastien Binet
1ed32c9a61
gopy: add simple Add func to 'simple' test package
...
Change-Id: I7ca1bd79e30812d7adbb8aad85ac1797eed8b215
2015-09-08 12:43:10 +02:00
Sebastien Binet
2570eebb8d
all: gofmt
2015-09-08 08:51:35 +02:00
Kyle Ellrott
76adcee3a5
gopy: casting struct arguments to method calls
...
This is a first attempt to properly cast struct arguments to method calls.
The test example would be:
func (S) MethodTest(S) {}
func FuncTest(S) {}
from the structs.go example.
Change-Id: I568299508c6f62975792acf9de2d6d2f7cc4271d
2015-09-08 08:47:38 +02:00
Kyle Ellrott
e40a2535ee
bind: ignore private fields in structs
...
This patch adds a check so that the types of private fields aren't exported
to the wrapper.
This is useful if writing a 'wrapper' package that buffers the python code
from complex Go concepts that aren't yet wrapped for python (like pointers
and channels).
The code:
_examples/wrapper/real_code.go and
_examples/wrapper/pywrapper/wrapper_code.go
can be compiled with the command:
gopy bind github.com/go-python/gopy/_examples/wrapper/pywrapper
and the functions manipulate Go classes gopy doesn't yet support, but they
are private, and not exported, so now the code will compile.
Fixes #60 .
2015-09-03 19:53:08 +02:00
Sebastien Binet
33f3ca06ba
bind: remove stale comment
...
Change-Id: Id3990d74d5547a95ef1d0e8d713788889833f416
2015-09-02 17:46:41 +02:00
Sebastien Binet
6422285aab
gopy: run go-get on package to wrap to handle deps
...
Change-Id: If030e5c4bab1401227e2e826c80b61d3053ad743
2015-09-02 17:13:33 +02:00
Sebastien Binet
998c78c822
bind: consolidate gengo-preamble
...
Change-Id: I24024ec118735be00f391060c257a990fe8a49d3
2015-09-02 17:09:19 +02:00
Sebastien Binet
3913a1e753
Merge pull request #50 from kellrott/master
...
bind: starting support for maps in go
Updates #22 .
2015-09-01 00:31:59 +02:00
Kyle Ellrott
c1a4248992
Starting to add the ability recognize maps in GO. (Updates #22 )
...
Responding to issues on PR discussion
2015-08-31 15:25:37 -07:00
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
3978d079ad
bind: dont wrap unexported methods
...
gengo was trying to wrap non-exported methods on named types.
don't do that.
Fixes #53 .
Change-Id: I1043ba18f9012100c6228e3db6d79bc55fbb41ec
2015-08-31 18:12:07 +02:00
Sebastien Binet
e62cd6aaf8
doc: add 'contribute' blurb
...
Change-Id: I93cac4ba8fe586c80e60b45950ef5efe04a41cad
2015-08-31 10:39:02 +02:00
Sebastien Binet
daf017bd41
bind: discover pkgconfig package name
...
This CL enhances gengo with the ability to discover the latest python.pc
package name and adds it to the #cgo pkgconfig pragma.
Fixes #51 .
Change-Id: If4d46d6fe90731df6b2cb4f9c39fb3ec967e7330
2015-08-31 10:23:57 +02:00
Sebastien Binet
6d80c41494
bind: add test script for interfaces
...
Change-Id: Iba3902544ebf5e1d0a7846803bcb628518334f7b
2015-08-14 13:31:28 +02:00
Sebastien Binet
d4e4779d2f
bind: first stab at wrapping interfaces
...
Change-Id: Ife9be87d97a1c796166c2ac204d7de0322326a94
2015-08-14 13:26:09 +02:00
Sebastien Binet
c1d3b45735
bind: first stab at a gopy object model
2015-08-14 13:04:35 +02:00
Sebastien Binet
c8ce550bd3
examples/iface: expand test
...
Change-Id: Ibe437b2af33ec9adcf136e51acf50bbc5f4e18b7
2015-08-14 13:01:21 +02:00
Sebastien Binet
14b9cb2dba
bind: test for sq_inplace_concat
...
Change-Id: I4f25f62647cc99a7397afbb5f5bba1dee5484e3d
2015-08-12 19:07:09 +02:00
Sebastien Binet
8273e0bc29
bind: support for sq_inplace_concat for slices
...
Fixes #26
Change-Id: Ic0dfa216c8149f25432fb38653b909a1ea1e010f
2015-08-12 19:05:54 +02:00
Sebastien Binet
e4d704fa3f
bind: fix typo in named-test
...
Change-Id: I761a1bd9b72e38f41198e681cb830766258a681e
2015-08-12 18:53:28 +02:00
Sebastien Binet
cd92a1aee8
bind: fix C99-ism
...
Change-Id: I37a13cbea00303fb16a50a9d8479c74a982e6c5c
2015-08-12 18:17:38 +02:00
Sebastien Binet
4c77c90e70
bind: test ctors for arrays+slices
...
Change-Id: I35a72f532713fa0a2668ec98080b715f01dbcae1
2015-08-12 18:13:32 +02:00
Sebastien Binet
66ad3791f4
bind: support for ctors for arrays+slices
...
Fixes #41 .
Change-Id: Iae4a05adf7ee13bd5646a68cfe09144c23b1487a
2015-08-12 18:12:29 +02:00
Sebastien Binet
be74c37022
gopy: dont reload C-extension module
...
While waiting for #27 to be handled upstream, prevent users from crashing their
interpreter by not allowing to reload a C-extension module if already wrapped
and compiled.
Fixes #46 .
Change-Id: Ic9624beae3061b286d09aca71882915923bd6298
2015-08-12 11:44:27 +02:00
Sebastien Binet
41f904d5cc
bind: add test for pointers
...
(but disabled for now)
Updates #45
Change-Id: I0c8a2cce45f99d36ffb62b1f8f85f20703c00acb
2015-08-12 11:30:47 +02:00
Sebastien Binet
f40527bd4f
bind: lift code into addPointerType
...
Change-Id: I3aca1d448e7eaa398d665ed1ddd836961146bcc5
2015-08-12 11:26:40 +02:00
Sebastien Binet
f6940af31c
bind: test typed constants and typenamed vars
2015-08-12 11:25:23 +02:00
Sebastien Binet
1b431ce89d
bind: support for typed constants+vars
...
Fixes #43
Change-Id: Ibf21bc4c792fe25e34f85b69a41a1f6d135e87f4
2015-08-12 10:52:32 +02:00
Sebastien Binet
c4ad7bd023
bind: change wrap pointer logic (HACK)
...
Change-Id: Idf21382b6b36d253e0ff46d8b86e75f3648ad0ab
2015-08-12 10:25:07 +02:00
Sebastien Binet
9b97454b76
bind: implement a 2-step scanning process
...
Package.process now scans types/objects in 2 steps:
- collect all symbols
- process these symbols to create bind.Struct and co.
Also, correctly create symbols for parameters and results of types.Func's
signature.
2015-08-12 10:24:19 +02:00
Sebastien Binet
13a0eaf035
bind: fix bug in addArrayType
...
Change-Id: Iad5f8964129a685e3a39220c8d118c485b9e9703
2015-08-12 09:11:57 +02:00
Sebastien Binet
085059a448
bind: fix bug in addSliceType
...
Change-Id: I5a33be74a20463d28d15d10be74b0b98a56a039d
2015-08-12 09:09:29 +02:00