test_types_basic.py 文件源码

python
阅读 26 收藏 0 点赞 0 评论 0

项目:psycopg2-for-aws-lambda 作者: iwitaly 项目源码 文件源码
def _import_cast(self):
        """Use ctypes to access the C function.

        Raise any sort of error: we just support this where ctypes works as
        expected.
        """
        import ctypes
        lib = ctypes.pydll.LoadLibrary(psycopg2._psycopg.__file__)
        cast = lib.typecast_BINARY_cast
        cast.argtypes = [ctypes.c_char_p, ctypes.c_size_t, ctypes.py_object]
        cast.restype = ctypes.py_object
        return cast
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号