{"action":"opened","issue":{"url":"https://api.github.com/repos/JaySon-Huang/pyjpegtbx/issues/11","labels_url":"https://api.github.com/repos/JaySon-Huang/pyjpegtbx/issues/11/labels{/name}","comments_url":"https://api.github.com/repos/JaySon-Huang/pyjpegtbx/issues/11/comments","events_url":"https://api.github.com/repos/JaySon-Huang/pyjpegtbx/issues/11/events","html_url":"https://github.com/JaySon-Huang/pyjpegtbx/issues/11","id":70616880,"number":11,"title":"使用ctypes重新封装？","user":{"login":"JaySon-Huang","id":4865550,"avatar_url":"https://avatars.githubusercontent.com/u/4865550?v=3","gravatar_id":"","url":"https://api.github.com/users/JaySon-Huang","html_url":"https://github.com/JaySon-Huang","followers_url":"https://api.github.com/users/JaySon-Huang/followers","following_url":"https://api.github.com/users/JaySon-Huang/following{/other_user}","gists_url":"https://api.github.com/users/JaySon-Huang/gists{/gist_id}","starred_url":"https://api.github.com/users/JaySon-Huang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JaySon-Huang/subscriptions","organizations_url":"https://api.github.com/users/JaySon-Huang/orgs","repos_url":"https://api.github.com/users/JaySon-Huang/repos","events_url":"https://api.github.com/users/JaySon-Huang/events{/privacy}","received_events_url":"https://api.github.com/users/JaySon-Huang/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-04-24T07:51:26Z","updated_at":"2015-04-24T07:51:26Z","closed_at":null,"body":"现在使用Python-C API编写jpegparser.c,Call库libjpeg的C函数来解析JPEG格式图像，但是返回对象的需要使用一个函数创建对象来返回，（没有找到如何返回一个类的方法），这样导致扩展困难。  \r\n刚刚研究了一下[Capstone](https://github.com/aquynh/capstone/tree/master/bindings/python)的Python bindings，发现里面也是使用ctypes封装。\r\n\r\n是否需要使用ctypes重新封装来让这个库有更好的扩展性？"}}