Skip to content

Instantly share code, notes, and snippets.

@damienrg
Created July 5, 2014 15:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save damienrg/2d1e4c652b12e53b0f8c to your computer and use it in GitHub Desktop.
Save damienrg/2d1e4c652b12e53b0f8c to your computer and use it in GitHub Desktop.
gopy-python3.4.patch debian patch based on EdVanDance
diff --git a/lib/cgo.go b/lib/cgo.go
index 8627e61..4c442d1 100644
--- a/lib/cgo.go
+++ b/lib/cgo.go
@@ -1,4 +1,4 @@
package py
-// #cgo pkg-config: python-3.3
+// #cgo pkg-config: python-3.4
import "C"
diff --git a/lib/class.go b/lib/class.go
index c129c79..d880e3e 100644
--- a/lib/class.go
+++ b/lib/class.go
@@ -789,7 +789,7 @@ func (c *Class) Create() (*Type, error) {
pyType.tp_name = C.CString(c.Name)
pyType.tp_basicsize = C.Py_ssize_t(typ.Elem().Size())
- pyType.tp_flags = C.Py_TPFLAGS_DEFAULT | C.long(c.Flags)
+ pyType.tp_flags = C.Py_TPFLAGS_DEFAULT | C.ulong(c.Flags)
C.setClassContext(pyType, ctxt)
diff --git a/lib/type.go b/lib/type.go
index e3942ab..fab4ff8 100644
--- a/lib/type.go
+++ b/lib/type.go
@@ -73,7 +73,7 @@ func (t *Type) Modified() {
// HasFeature returns true when "t" has the feature in question.
func (t *Type) HasFeature(feature uint32) bool {
- return (t.o.tp_flags & C.long(feature)) != 0
+ return (t.o.tp_flags & C.ulong(feature)) != 0
}
// IsGc returns true if the type "t" supports Cyclic Garbage Collection.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment