首页 > 编程语言 > 详细

hybrid programming based on python and C/C++

时间:2017-02-21 13:29:32      阅读:161      评论:0      收藏:0      [点我收藏+]

 Python/C API Reference Manual?  

https://docs.python.org/3/c-api/index.html

Extending and Embedding the Python Interpreter?

https://docs.python.org/3/extending/

1) include Python.h before any standard headers are included.

2) Stealing a reference means that when you pass a reference to a function, that function assumes that it now owns that reference, and you are not responsible for it any longer

3) When no ownership is transferred, the caller is said to borrow the reference. Nothing needs to be done for a borrowed reference.

4) in many cases, the returned object is created on the fly, and the reference you get is the only reference to the object.

5) the one owns the reference is responsible to deref it 

others:

http://blog.csdn.net/fatshaw/article/details/6152900

http://blog.csdn.net/marising/article/details/2845339

hybrid programming based on python and C/C++

原文:http://www.cnblogs.com/resibe-3/p/6423604.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!