mirror of
https://github.com/psycopg/psycopg2.git
synced 2025-02-16 17:10:32 +03:00
Merge pull request #1110 from UpGado/patch-1
Fix ctypes doc example AttributeError
This commit is contained in:
commit
a9b814cb53
|
@ -724,6 +724,7 @@ The ``connection`` class
|
|||
raw connection structure to C functions, e.g. via `ctypes`::
|
||||
|
||||
>>> import ctypes
|
||||
>>> import ctypes.util
|
||||
>>> libpq = ctypes.pydll.LoadLibrary(ctypes.util.find_library('pq'))
|
||||
>>> libpq.PQserverVersion.argtypes = [ctypes.c_void_p]
|
||||
>>> libpq.PQserverVersion.restype = ctypes.c_int
|
||||
|
|
Loading…
Reference in New Issue
Block a user