dXejddlZddlZddlmZddlmZddlmZ en #e $re ZYnwxYwe Z GddZ dZd Zd ZdS) N) allocate_lock) CDefError)modelcxeZdZdZd;dZddZd?d Zd Z d Z d>d Z d Z dZ dZdZd;dZ d@dZdZdAdZdZedfdZdZdBdZdCdZd?dZdZdDdZd Zd!Zeeedd"Z dAd#Z!d$Z"d%Z#d&Z$d'Z%d(Z&d)Z'd*Z(d+Z)d,Z*d-Z+dEd/Z, dEd0Z-dFd2Z.d3Z/d4Z0dGd6Z1d7Z2d8Z3d9Z4d:Z5dS)HFFIa The main top-level class that you instantiate once, or once per module. Example usage: ffi = FFI() ffi.cdef(""" int printf(const char *, ...); """) C = ffi.dlopen(None) # standard library -or- C = ffi.verify() # use a C compiler: verify the decl above is right C.printf("hello, %s!\n", ffi.new("char[]", "world")) Nc |sddl}ddlm}|j|kr^t|dr+t d|dt d|jd|jd t d|dt d |jd dd lm}||_t|_ | |_ i|_ tjd j|_tjd j|_g|_g|_g|_g|_d|_i|_d|_d|_t5j||_t|dr||t=|jD]6}|drtA||tC||7|j 5|"t4j#|_$|"t4j%|_&dddn #1swxYwYtO|tjrfttPdsP|)|j$dtP_*|+\tP_,tP_-nA|)|j$d|_*|+\|_,|_-|j.|_.dS)z{Create an FFI instance. The 'backend' argument is used to select a non-default backend, mostly for tests. Nrr) __version____file__z5Version mismatch: this is the 'cffi' package version z , located in zQ. When we import the top-level '_cffi_backend' extension module, we get version z=. The two versions should be equal; check your installation.zS. This interpreter comes with a built-in '_cffi_backend' module, which is version )cparser parsed_types new_typesset_ffiRTLD_NULL)/ _cffi_backendr hasattr Exceptionr r _backendr_lockParser_parser_cached_btypestypes ModuleType__dict__ _parsed_types _new_types_function_caches _libraries _cdefsources_included_ffis_windows_unicode_init_once_cache _cdef_version _embeddingr get_typecache _typecacherlist startswithsetattrgetattr_get_cached_btype voidp_typeBVoidPchar_array_typeBCharA isinstancercastr _get_typesCDataCTypebuffer)selfbackendr r names `/home/jenkins/jenkins/workspace/simtester-sanitize/venv/lib/python3.11/site-packages/cffi/api.py__init__z FFI.__init__"s# ? , + + + % % % % % %"k117J//E#)# XXX+++W-=-=-=%?@@@ $)# XXXw/B/B/B%DEEE  "__ ~~''  "-n==F*;77@ "  $ "!-g66 7I & & " OOD ! ! !)** < |}||jvr |j|St|ts|d}|j|}|j}|r|}||}||f}||j|<|S)NrJ) rr3rKrNr parse_typeis_raw_functionas_function_pointerr.)r9cdeclkeyr`really_a_function_typebtyperesults r<_typeof_lockedzFFI._typeof_lockeds $$ $ $%c* *%%% *LL))E|&&u--!%!5 ! .++--D&&t,,.."(3 rEc |j|}nD#t$r7|j5||}dddn #1swxYwYYnwxYw|\}}|r|st d|d|S)Nz the type z3 is a function type, not a pointer-to-function type)rKeyErrorrrlr)r9rgconsider_function_as_funcptrrkrjris r<_typeofz FFI._typeofs 4'.FF 4 4 4 4 4,,U33 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4)/%% ! C*F C):?%%BCC C s1 AA AA A A AAc t|tr||St||jr|j|St|t jrt|}||St|t j rIt|dr9|j 5| |j cdddS#1swxYwYtt|)zParse the C type given as a string and return the corresponding object. It can also be used on 'cdata' instance to get its C type. N_cffi_base_type)r3rLrpr6rtypeofrBuiltinFunctionType_builtin_function_type FunctionTyperrr.rrrMr`)r9rgress r<rsz FFI.typeofsD eZ ( ( '<<&& & eTZ ( ( /=''.. . eU6 7 7 (//C ue0 1 1 EE#455 E E E--e.CDD E E E E E E E E E E E E E E E EU $$$s8CC#&C#ct|tr/||}|j|S|j|S)zvReturn the size in bytes of the argument. It can be a string naming a C type, or a 'cdata' instance. )r3rLrprsizeof)r9rgBTypes r<ryz FFI.sizeofsS eZ ( ( /LL''E=''.. .=''.. .rEct|tr||}|j|S)z\Return the natural alignment size in bytes of the C type given as a string. )r3rLrpralignof)r9rgs r<r|z FFI.alignofs= eZ ( ( (LL''E}$$U+++rEc~t|tr||}|j|g|RdS)a3Return the offset of the named field inside the given structure or array, which must be given as a C type name. You can give several field names in case of nested structures. You can also give numeric values which correspond to array items, in case of an array type. r)r3rLrp _typeoffsetof)r9rgfields_or_indexess r<offsetofz FFI.offsetofsH eZ ( ( (LL''E!t!%<*;<< object goes out of scope, the memory is freed. In other words the returned object has ownership of the value of type 'cdecl' that it points to. This means that the raw data can be used as long as this object is kept alive, but must not be used for a longer time. Be careful about that when copying the pointer to the memory somewhere else, e.g. into another structure. )r3rLrprnewp)r9rginits r<newzFFI.news?. eZ ( ( (LL''E}!!%...rETcxj}||||dfd }|S)aReturn a new allocator, i.e. a function that behaves like ffi.new() but uses the provided low-level 'alloc' and 'free' functions. 'alloc' is called with the size as argument. If it returns NULL, a MemoryError is raised. 'free' is called with the result of 'alloc' as argument. Both can be either Python function or directly C functions. If 'free' is None, then no free function is called. If both 'alloc' and 'free' are None, the default is used. If 'should_clear_after_alloc' is set to False, then the memory returned by 'alloc' is assumed to be already cleared (or you are fine with garbage); otherwise CFFI will clear it. Ncpt|tr|}||SNr3rLrp)rgr allocatorr9s r<allocatez#FFI.new_allocator..allocates8%,, , U++9UD)) )rEr)rr new_allocator)r9allocfreeshould_clear_after_alloc compiled_ffirrs` @r<rzFFI.new_allocatorsa}((**  ..ud/GII  * * * * * * *rEct|tr||}|j||S)zSimilar to a C cast: returns an instance of the named C type initialized with the given 'source'. The source is casted between integers or pointers of any type. )r3rLrprr4)r9rgsources r<r4zFFI.casts? eZ ( ( (LL''E}!!%000rEc8|j||S)aReturn a Python string (or unicode string) from the 'cdata'. If 'cdata' is a pointer or array of characters or bytes, returns the null-terminated string. The returned string extends until the first null character, or at most 'maxlen' characters. If 'cdata' is an array then 'maxlen' defaults to its length. If 'cdata' is a pointer or array of wchar_t, returns a unicode string following the same rules. If 'cdata' is a single character or byte or a wchar_t, returns it as a string or unicode string. If 'cdata' is an enum, returns the value of the enumerator as a string, or 'NUMBER' if the value is out of range. )rstring)r9cdatamaxlens r<rz FFI.string's }##E6222rEc8|j||S)aLUnpack an array of C data of the given length, returning a Python string/unicode/list. If 'cdata' is a pointer to 'char', returns a byte string. It does not stop at the first null. This is equivalent to: ffi.buffer(cdata, length)[:] If 'cdata' is a pointer to 'wchar_t', returns a unicode string. 'length' is measured in wchar_t's; it is not the size in bytes. If 'cdata' is a pointer to anything else, returns a list of 'length' items. This is a faster equivalent to: [cdata[i] for i in range(length)] )runpack)r9rlengths r<rz FFI.unpack9s}##E6222rEc|tur |j|}}n*t|tr||}|j|||S)aReturn a cdata of the given type pointing to the data of the given Python object, which must support the buffer interface. Note that this is not meant to be used on the built-in types str or unicode (you can build 'char[]' arrays explicitly) but only on objects containing large quantities of raw data in some other format, like 'array.array' or numpy arrays. The first argument is optional and default to 'char[]'. ) _unspecifiedr2r3rLrpr from_buffer)r9rg python_bufferrequire_writables r<rzFFI.from_bufferWs` L ( (#';=EE z * * (LL''E}(( )9;; ;rEc:|j|||S)a_ffi.memmove(dest, src, n) copies n bytes of memory from src to dest. Like the C function memmove(), the memory areas may overlap; apart from that it behaves like the C function memcpy(). 'src' can be any cdata ptr or array, or any Python buffer object. 'dest' can be any cdata ptr or array, or a writable Python buffer object. The size to copy, 'n', is always measured in bytes. Unlike other methods, this one supports all Python buffer including byte strings and bytearrays---but it still does not support non-contiguous buffers. )rmemmove)r9destsrcns r<rz FFI.memmoveis}$$T3222rEcfd}ttrd||S||S)aReturn a callback object or a decorator making such a callback object. 'cdecl' must name a C function pointer type. The callback invokes the specified 'python_callable' (which may be provided either directly or via a decorator). Important: the callback object must be manually kept alive for as long as the callback may be invoked from the C level. czt|stdj|S)Nz.the 'python_callable' argument is not callable)callablerMrcallback)python_callablergerroronerrorr9s r<callback_decorator_wrapz-FFI.callback..callback_decorator_wrapsMO,, 3!2333=))%*/:: :rET)ror)r9rgrrrrs`` `` r<rz FFI.callbackysu : : : : : : : : eZ ( ( KLLTLJJE  "* ***?;; ;rErcFt|tr||}|}|dr#d|j|dvrd|z}n|r|ddvrd|z}|j||S)a.Return a string giving the C type 'cdecl', which may be itself a string or a object. If 'replace_with' is given, it gives extra text to append (or insert for more complicated C types), like a variable name, or '*' to get actually the C type 'pointer-to-cdecl'. *z&[&z(%s)rz[( )r3rLrpstripr+rgetcname)r9rg replace_withs r<getctypez FFI.getctypes eZ ( ( (LL''E#))++  # #C ( ( .DM225#>>>>!L0LL  .l1oT99-L}%%e\:::rEc:|j|||S)aReturn a new cdata object that points to the same data. Later, when this new cdata object is garbage-collected, 'destructor(old_cdata_object)' will be called. The optional 'size' gives an estimate of the size, used to trigger the garbage collection more eagerly. So far only used on PyPy. It tells the GC that the returned object keeps alive roughly 'size' bytes of external memory. )rgcp)r9r destructorsizes r<gczFFI.gcs}   D999rEc|jddusJ |j|}nC#t$r6g}|||}|D]}|||YnwxYw|S)NF)racquirerrnget_cached_btyperT)r9r`rzrWs r<r.zFFI._get_cached_btypesz!!%((E1111 ;'-EE ; ; ;J))$ ;;E" ; ;((z:::: ; ; ;  s .=A.-A.c ddlm}m}|jr|||p |}||||fi||_|j}|j||S)aVerify that the current ffi signatures compile on this machine, and return a dynamic library object. The dynamic library can be used to call functions and access global variables declared in this 'ffi'. The library is compiled by the C compiler: it gives you C-level API compatibility (including calling macros). This is unlike 'ffi.dlopen()', which requires binary compatibility in the signatures. r)Verifier_caller_dir_pycache)verifierrrr$_apply_windows_unicode load_libraryr!rQ)r9rtmpdirkwargsrrr\s r<verifyz FFI.verifys <;;;;;;;   0  ' ' / / / 0..00!vv@@@@ m((** s### rEc4|jSr)r get_errno)r9s r< _get_errnozFFI._get_errnos}&&(((rEc:|j|dSr)r set_errno)r9errnos r< _set_errnozFFI._set_errnos &&&&&rEz(the value of 'errno' from/to the C callsc6|j|Sr)r getwinerror)r9codes r<rzFFI.getwinerrors}((...rEcn|j5tj||cdddS#1swxYwYdSr)rr pointer_cache)r9ctypes r< _pointer_tozFFI._pointer_tos~ Z 4 4&tU33 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4s *..c |j|}nB#t$r5dt|jvrt|j|g|RcYSwxYw|r|j|g|R\}}n|jdkrtdd}||}|j |||S)zReturn the address of a . If 'fields_or_indexes' are given, returns the address of that field or array item in the structure or array, recursively in case of nested structures. __addressof__pointerzaddressof(pointer)r) rrsrMr`rrr~kindr rawaddressof)r9rrroffsetctypeptrs r< addressofz FFI.addressofs  M((//EE   $u++"6660tE{{0K9JKKKKKK    .D.uI7HIIIME66zY&& 4555F##E**}))(E6BBBs;AAc|j||\}}|D]&}|j||d\}}||z }'||fS)Nr)r typeoffsetof)r9rfield_or_indexrrfield1offset1s r<r~zFFI._typeoffsetofs_ 225.II v'  F!]77vqIINE7 g FFf}rEc4t|ts$tdt|j||urt d|j5|j5|j|j|j d|j |j |j d|j |dddn #1swxYwYddddS#1swxYwYdS)aIncludes the typedefs, structs, unions and enums defined in another FFI instance. Usage is similar to a #include in C, where a part of the program might include types defined in another part for its own usage. Note that the include() method has no effect on functions, constants and global variables, which must anyway be accessed directly from the lib object returned by the original FFI instance. zEffi.include() expects an argument that is also of type cffi.FFI, not zself.include(self)[]N) r3rrMr`__name__ ValueErrorrrincluder"rQextendr#)r9ffi_to_includes r<rz FFI.includes.#.. A) $^ 4 4 = =@AA A T ! !122 2  ! ; ; ; ; $$^%;<<<!((---!(()DEEE!((---#**>:::  ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ;s7D B C5) D 5C9 9D <C9 =D  DDcB|j|j|Sr)r newp_handler0r9xs r< new_handlezFFI.new_handles}((a888rEc6|j|Sr)r from_handlers r<rzFFI.from_handles}((+++rEc:|j|dSr)rreleasers r<rz FFI.releases a     rEc|jtdt|}|r|dn|d||_dS)acWindows: if 'enabled_flag' is True, enable the UNICODE and _UNICODE defines in C, and declare the types like TCHAR and LPTCSTR to be (pointers to) wchar_t. If 'enabled_flag' is False, declare these types to be (pointers to) plain 8-bit characters. This is mostly for backward compatibility; you usually want True. Nz%set_unicode() can only be called onceztypedef wchar_t TBYTE;typedef wchar_t TCHAR;typedef const wchar_t *LPCTSTR;typedef const wchar_t *PCTSTR;typedef wchar_t *LPTSTR;typedef wchar_t *PTSTR;typedef TBYTE *PTBYTE;typedef TCHAR *PTCHAR;ztypedef char TBYTE;typedef char TCHAR;typedef const char *LPCTSTR;typedef const char *PCTSTR;typedef char *LPTSTR;typedef char *PTSTR;typedef TBYTE *PTBYTE;typedef TCHAR *PTCHAR;)r$rboolrD)r9 enabled_flags r< set_unicodezFFI.set_unicodes~  ,DEE EL))  0 II/ 0 0 0 0 II/ 0 0 0!-rEc|dd}t|ttfst dt|ddgz}||d<dS)N define_macrosz''define_macros' must be a list or tuple)UNICODE1)_UNICODEr)getr3r*tuplerM)r9kwds defmacross r<rzFFI._apply_windows_unicode<sfHH_b11 )dE]33 GEFF FOO'7'8':: )_rEc2fd}dtjvrddl}tjdkrddtj}t tdr/|d|jtj dnYtjd krd }nd }t tdr/|d|jtj d t tdr0|d|jtj d dntjdkrd}t tdr|dz }nK ddl }n#t$r ddl m }YnwxYwd}| dr|| dz }|tjdz tjdz dzfz}t tdr|tjz }|d|tjdkr|dddSdS)Ncj|g}||vr||dSdSr) setdefaultrQ)rhvaluelstrs r<ensurez(FFI._apply_embedding_fix..ensureFsA//#r**CC 5!!!!! rE__pypy__rwin32zpython{0[0]}{0[1]}prefix library_dirslibszpypy-czpypy3-cbinpypygoalz python%d%dgettotalrefcount_d) sysconfigz python%d.%d DEBUG_EXTabiflags librariesextra_link_argsz /MANIFEST)sysbuiltin_module_namesosplatformformat version_inforpathjoinrr ImportErrorcffi._shimmed_dist_utilsget_config_var hexversionr)r9rrr pythonlibtemplaters ` r<_apply_embedding_fixzFFI._apply_embedding_fixDsU " " " " " 1 1 1 III|w&&1778HII 3))MF>27<< F+K+KLLL #d** (II )I3))LF>27<< E+J+JKKKsH%% Q~rw||CJ'O'OPPP|w&&'3 233%$HC$$$$$"CCCBBBBBBBBC(++K88F 8 8 E EEH!^r)CNb,@D+HIJIsJ'' *S\) {I&&& <7 " " F$k 2 2 2 2 2 # "sE E32E3.cc ddl}t|drtdt|tst d|j|vs|jr|j|vrtdt||||f|_ dS)Nr_assigned_sourcez:set_source() cannot be called several times per ffi objectz'module_name' must be a stringzY'module_name' must not contain '/': use a dotted name to make a 'package.module' location) rrrr3rLrMsepaltseprKr*)r9 module_namersource_extensionrrs r< set_sourcezFFI.set_sourcevs 4+ , , /.// /+z22 ><== = 6[ RY 29 3K3KHII I!$[!1!16!14!9rEc ddlm}t|tst d||}||||j|||fi|dS)Nr) pkgconfigz;the pkgconfig_libs argument must be a list of package names)rr1r3r*rMflags_from_pkgconfig merge_flagsr/)r9r-pkgconfig_libsrr.rr1kwds2s r<set_source_pkgconfigzFFI.set_source_pkgconfigs.$// 0/00 0..~>>dE*** V-=FFFFFFFrEbuildcddlm}ddlm}t |ds8t |dr|jStd|j\}}}}|td||||||f|||d d |\} } |r_| r/tj d | j dd n.tj d | j dd | S)Nr)mkpathr recompiler*rz8set_source() must be called before distutils_extension()zadistutils_extension() is only for C extension modules, not for dlopen()-style pure Python modulesF)rextradirr.call_c_compilerz regenerated:  znot modified: )r"r9 recompilerr;rr get_extensionrr*rMrstderrwritesources) r9rverboser9r;r-rr.rextupdateds r<distutils_extensionzFFI.distutils_extensions[333333))))))t/00 7tZ(( 5}22444677 76:6K3 V-t >&'' ' v y{!'@062B16@@;?@@ W  K K     A!HIIII    Q!IJJJ rEcddlm}t|dstd|j\}}}}|t d||||f|ddd|dS)Nrr:r*0set_source() must be called before emit_c_code()zYemit_c_code() is only for C extension modules, not for dlopen()-style pure Python modulesFc_filer=uses_ffiplatformr?r;rrr*rMr9filenamer;r-rr.rs r< emit_c_codezFFI.emit_c_codes))))))t/00 QOPP P6:6K3 V-t >IJJ J $ V 2!5#( 2 2,0 2 2 2 2 2rEcddlm}t|dstd|j\}}}}|t d||||f|ddd|dS)Nrr:r*rIz^emit_python_code() is only for dlopen()-style pure Python modules, not for C extension modulesFrJrMrNs r<emit_python_codezFFI.emit_python_codes))))))t/00 QOPP P6:6K3 V-t  OPP P $ V 2!5#( 2 2,0 2 2 2 2 2rE.c ddlm}t|dstd|j\}}}} ||||f|||||d| S)aThe 'target' argument gives the final file name of the compiled DLL. Use '*' to force distutils' choice, suitable for regular CPython C API modules. Use a file name ending in '.*' to ask for the system's default extension for dynamic libraries (.so/.dll/.dylib). The default is '*' when building a non-embedded C API extension, and (module_name + '.*') when building an embedded library. rr:r*z,set_source() must be called before compile())rtargetr.compiler_verbosedebug)r?r;rrr*) r9rrDrUrWr;r-rr.rs r<compilez FFI.compiles *)))))t/00 MKLL L6:6K3 V-ty{FH6 &9I*1HHBFHH HrEct |j|}n9#t$r,|j|dtf}YnwxYw|dr|dS|d5|j|}|dr|dcdddS|}d|f|j|<dddn #1swxYwY|S)NFrrT)r%rnrr)r9functagrrks r< init_oncez FFI.init_onces>  P%c*AA P P P%00umoo6NOOAAA P Q4 Q4K qT 8 8%c*At t  8 8 8 8 8 8 8 8 TVVF*.D !# & 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 s' 3AA!B- B--B14B1c|jrtdddl}|d|}|r||d}|pdg}|d|d}tdt|D]R|}| r4| |s|dd}| |St|fd|D}d |}t|d d ||_dS) Nz-embedding_init_code() can only be called oncerz\s*\nrz\s*rrc*g|]}|ddzS)Nr>r).0lineis r< z+FFI.embedding_init_code..s%1114abb$111rE cffi_initexec) r'rrematchend splitlinesgrouprangelenrstripr+r rX)r9pysourcererflinesrr`ras @r<embedding_init_codezFFI.embedding_init_codesT ? NLMM M  8,,  . -H##%%-"&%(++1133q#e**%% ) )A8D{{}} )//&11)#CRC[F//&11) KK11115111775>>+v..."rEc td)Nz:ffi.def_extern() is only available on API-mode FFI objects)r)r9argsrs r< def_externzFFI.def_externs#$$ $rEcg}g}g}|jjD]}|dr||dd5|dr||ddh|dr||dd||||||fS)zReturns the user type names known to this FFI instance. This returns a tuple containing three lists of names: (typedef_names, names_of_structs, names_of_unions) ztypedef Nzstruct zunion )r _declarationsr+rQsort)r9typedefsstructsunionsrhs r< list_typeszFFI.list_types s <- ' 'C~~j)) 'ABB(((( ** 's122w'''')) ' c!""g&&&   '6**rEr)FFN)FN)F)r)NNT)r)NNN)r)rN)r()r7T)rSrNN)6r __module__ __qualname____doc__r=rDrHrBr^rbrlrprsryr|rrrr4rrrrrrrrr.rrrpropertyrrrrr~rrrrrrr'r/r6rGrPrRrXr\rorrr|rrEr<rrs":%:%:%:%x I I I I!!!! ====$$&&&$    %%%&///,,, @ @ @////6.2/301113333$333<0<%*;;;;$333 <<<<*;;;; : : : :   <)))''' HZT? A AE////444CCC*;;;.999,,,!!!---<***030303d 9 9 9 9/3GGGG4 2 2 2 2 2 2HHHH&0###4$$$+++++rErcddl}t|ts*tjdks||||Sd}d}d|vs d|vs |j|vr0 |||S#t$r }|}Yd}~nd}~wwxYwddl}|j |}|R|dkr/tjdkrtj dkrtdd|}||d |}t||||S) NrrcrS/r zXdlopen(None) cannot work on Windows for Python 3 (see http://bugs.python.org/issue23606)zEctypes.util.find_library() did not manage to locate a library called z. Additionally, ) rr3rLrrrr+OSError ctypes.utilutil find_libraryr) r:r;r[r first_errorectypesrmsgs r<_load_backend_librs] III dJ ' ' <7 " "d&6''e44 4K d{{cTkkRVt^^ ''e44 4   KKKKKK  ; # #D ) )D | 3;;3<722s7G47O7ODEE E37$9  "-8[[##>Ccll   e , ,,sA.. B8A??Bc  j}t||| fd fd fd dfdi dg i  fd fdG fd d t|trF t|ts|d }d |z_n#t$rYnwxYwjfS) Ncd|z}jj|\}}|}||}|j|<dS)Nz function )rrwr. load_functionr) r;rhrX_rzr backendlibffilibrarys r<accessor_functionz,_make_ffi_library..accessor_function=s[D  )#.A%%b))((55!&rEc dz} jj|\}} |jjt t fdfddS)N variable cSrr)r9rzr; read_variables r<z>_make_ffi_library..accessor_variable..Ksud33rEc|Srr)r9rrzr;write_variables r<rz>_make_ffi_library..accessor_variable..LsudE B BrE)rrwr.rrr,r) r;rhrXrrzrr FFILibraryrrs ` @@@r<accessor_variablez,_make_ffi_library..accessor_variableDsD  )#.A%%b))"0 #2 D( 3 3 3 3 3 3 B B B B B B#D#D E E E E ErEc` |S#t$rj5|vrjd|z}jj|\}}|}|jdkrt j|}||}||<dddn #1swxYwY|cYSwxYw)Nrarray) rnrrrwr.rrrr) r;rhrXrrzpaddr_variablesrrs r< addressof_varz(_make_ffi_library..addressof_varNs (!$' ' ( ( ( - -~--%,CK5c:EB11"55EzW,, % 3C ? ?"00==A+,N4( - - - - - - - - - - - - - - -"$' ' ' ' (s3 B-A/B B-B B-B  B-,B-c(td|d)Nznon-integer constant 'z,' cannot be accessed from a dlopen() library)NotImplementedError)r;s r<accessor_constantz,_make_ffi_library..accessor_constant]s'!!HL#OPP PrEc<jj|j|<dSr)r_int_constantsr)r;rrs r<accessor_int_constantz0_make_ffi_library..accessor_int_constantas !$!;D!ArEFc djurdSjjD]\}\}}t |t js=|dd\}}|dkr |<G|dkr |<S|dkr |<_t|j D]\}}||ffd }| |<jj D]} | j d<dS)NrrrfunctionvariableconstantcZ||j|j|<dSr)check_not_partial enumvaluesr)r;rXrars r< accessor_enumzB_make_ffi_library..update_accessors..accessor_enumws/,,...13q1A(...rE) r&rrwitemsr3rEnumTypesplit enumerate enumeratorsrr)rhrXrr[r;raenumnamerrrrr accessorsaccessors_versionrrs r<update_accessorsz+_make_ffi_library..update_accessorshsM Q 3#4 4 4 FK5;;== 8 8LC"ab%.11 8IIc1-- T*$$&7IdOOJ&&&7IdOOJ&&&7IdO#,R^#<#<88KAx/1QBBBBBB+8Ih'' 8 K. > >D  '< = = = ="0!rEcj5|jvs |jvr ddddS|vr|vrt|||ddddS#1swxYwYdSr)rrAttributeError)r;rrrrrs r< make_accessorz(_make_ffi_library..make_accessors Y " "w'''4:3F+F+F " " " " " " " "9$$  """y(((... IdOD ! ! ! " " " " " " " " " " " " " " " " " "sA)2A))A-0A-cLeZdZfdZfdZfdZfdZfdZdS)%_make_ffi_library..FFILibraryc:|t||Sr)r-)r9r;rs r< __getattr__z1_make_ffi_library..FFILibrary.__getattr__s# M$   4&& &rEc t|j|}|||dS#t$r |t |||YdSwxYwr)r- __class____set__rr,)r9r;rrrs r< __setattr__z1_make_ffi_library..FFILibrary.__setattr__s ."4>488   u----- " + + + d###dE****** +s0&AAcj5cdddS#1swxYwYdSr)rkeys)r9rrrs r<__dir__z-_make_ffi_library..FFILibrary.__dir__s ( (  """ ~~'' ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( (s 488c|jvr j|S|jvr |S||jvr j|S|jvr |Std|d)Nz7cffi library has no function or global variable named '')rr)r9r;rrrrs r<rz3_make_ffi_library..FFILibrary.__addressof__sw''''--z***$}T*** M$   w''''--z***$}T*** .AE"HII IrEcb|jdSr) close_librrR)r9rs r<raz4_make_ffi_library..FFILibrary.__cffi_close__s/  " " " M   ! ! ! ! !rEN)rr}r~rrrrra)rrrrrrrrsr<rrs ' ' ' ' ' . . . . . ( ( ( ( ( ( ( I I I I I I I I " " " " " " "rErzutf-8z FFILibrary_%s) rrr3rLrKrNr UnicodeErrorr)rlibnamer[r:rrrrrrrrrrrrrs` @@@@@@@@@@@@@r<rZrZ9s&lG"7GU;;J'''''''EEEEEEE ( ( ( ( ( ( (PPPBBBBBBIN111111111111.""""""""""""""""""""""""""@':&& gs++ 2!..11"1G";J      D jllG G$ $$s 4C CCcddl} |j|j}|j}|j}||}|j5||cdddS#1swxYwYdS#tttf$rYdSwxYw)Nr) rmodulesr}_cffi_original_ffi_cffi_types_of_builtin_funcsrr.rnrrM)rZrmodulertypes_of_builtin_funcsrXs r<rurusJJJ -T_-'!'!D #D )Y - -((,, - - - - - - - - - - - - - - - - - - ni 0tts"(A$AAA$A?>A?)rrlockrrrrrrL NameErrorrKrOrrrrZrurrEr<rsJJJJJvxx L +L +L +L +L +L +L +L +^---4x%x%x%t - - - - -s ))