lib/pycall/libpython.rb in pycall-0.1.0.alpha.20170226 vs lib/pycall/libpython.rb in pycall-0.1.0.alpha.20170302
- old
+ new
@@ -150,10 +150,11 @@
attach_function :PyObject_IsInstance, [PyObject.by_ref, PyObject.by_ref], :int
attach_function :PyObject_Dir, [PyObject.by_ref], PyObject.by_ref
attach_function :PyObject_Repr, [PyObject.by_ref], PyObject.by_ref
attach_function :PyObject_Str, [PyObject.by_ref], PyObject.by_ref
attach_function :PyObject_Type, [PyObject.by_ref], PyTypeObject.by_ref
+ attach_function :PyCallable_Check, [PyObject.by_ref], :int
# Bool
attach_function :PyBool_FromLong, [:long], PyObject.by_ref
@@ -201,13 +202,13 @@
# PyUnicode_DecodeUTF8
case
when libpython.find_symbol('PyUnicode_DecodeUTF8')
attach_function :PyUnicode_DecodeUTF8, [:string, :ssize_t, :string], PyObject.by_ref
when libpython.find_symbol('PyUnicodeUCS4_DecodeUTF8')
- attach_function :PyUnicodeUCS4_DecodeUTF8, [:string, :ssize_t, :string], PyObject.by_ref
+ attach_function :PyUnicode_DecodeUTF8, :PyUnicodeUCS4_DecodeUTF8, [:string, :ssize_t, :string], PyObject.by_ref
when libpython.find_symbol('PyUnicodeUCS2_DecodeUTF8')
- attach_function :PyUnicodeUCS2_DecodeUTF8, [:string, :ssize_t, :string], PyObject.by_ref
+ attach_function :PyUnicode_DecodeUTF8, :PyUnicodeUCS2_DecodeUTF8, [:string, :ssize_t, :string], PyObject.by_ref
end
# PyUnicode_AsUTF8String
case
when libpython.find_symbol('PyUnicode_AsUTF8String')
@@ -277,9 +278,10 @@
attach_function :PyNumber_Add, [PyObject.by_ref, PyObject.by_ref], PyObject.by_ref
attach_function :PyNumber_Subtract, [PyObject.by_ref, PyObject.by_ref], PyObject.by_ref
attach_function :PyNumber_Multiply, [PyObject.by_ref, PyObject.by_ref], PyObject.by_ref
attach_function :PyNumber_TrueDivide, [PyObject.by_ref, PyObject.by_ref], PyObject.by_ref
+ attach_function :PyNumber_Power, [PyObject.by_ref, PyObject.by_ref, PyObject.by_ref], PyObject.by_ref
# Compiler
attach_function :Py_CompileString, [:string, :string, :int], PyObject.by_ref
attach_function :PyEval_EvalCode, [PyObject.by_ref, PyObject.by_ref, PyObject.by_ref], PyObject.by_ref