File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 292292 METH_O
293293 METH_STATIC
294294 METH_VARARGS
295- PyCFunction_New
295+ PyCFunction_NewEx
296296 PyInstanceMethod_New)
297297
298298
Original file line number Diff line number Diff line change 5151; ; #endif
5252
5353
54- (def-pylib-fn PyCFunction_New
54+ (def-pylib-fn PyCFunction_NewEx
5555 " Create a new callable from an item."
5656 Pointer
5757 [method-def (partial jna/ensure-type PyMethodDef)]
58- [self as-pyobj])
58+ [self as-pyobj]
59+ [module as-pyobj])
5960
6061
6162(def-pylib-fn PyInstanceMethod_New
Original file line number Diff line number Diff line change @@ -444,11 +444,12 @@ Object's refcount is bad. Crash is imminent"
444444 ; ;This is a nice little tidbit, cfunction_new
445445 ; ;steals the reference.
446446 (let [py-self (when py-self (incref (->python py-self)))]
447- (-> (libpy/PyCFunction_New (method-def-data->method-def
448- {:name method-name
449- :doc documentation
450- :function cfunc})
451- py-self)
447+ (-> (libpy/PyCFunction_NewEx (method-def-data->method-def
448+ {:name method-name
449+ :doc documentation
450+ :function cfunc})
451+ py-self
452+ nil )
452453 (wrap-pyobject )))))
453454
454455
You can’t perform that action at this time.
0 commit comments