ó o®¸Qc@sgddlZddlTddlZeejƒZdejfd„ƒYZedkrcej ƒndS(iÿÿÿÿN(t*tStringPtrTestCasecBs#eZd„Zd„Zd„ZRS(cCsÞdtfd„ƒY}|ƒ}|jtt|jdƒtdƒ}ddlm}|j||ƒdƒ||_|j||ƒdƒx5t t |ƒƒD]!}|j|||j|ƒqœW|jt t |d dƒdS( NtXcBseZdeeƒfgZRS(tstr(t__name__t __module__tPOINTERtc_chart_fields_(((s0/sys/lib/python2.7/ctypes/test/test_stringptr.pyR stcontentss Hello, Worldiÿÿÿÿ(t getrefcountiiR( t Structuret assertRaisest ValueErrortgetattrRtc_buffertsysR t assertEqualtrangetlent TypeErrortsetattr(tselfRtxtbtgrcti((s0/sys/lib/python2.7/ctypes/test/test_stringptr.pyttest__POINTER_c_char s   cCswdtfd„ƒY}|ƒ}|j|jdƒd|_|j|jdƒtdƒ}|jtt|d|ƒdS(NRcBseZdefgZRS(R(RRtc_char_pR(((s0/sys/lib/python2.7/ctypes/test/test_stringptr.pyRss Hello, WorldR(R RRtNoneRR RR(RRRR((s0/sys/lib/python2.7/ctypes/test/test_stringptr.pyttest__c_char_ps   cCs?tj}t|_ttf|_|j|ddƒdƒ|j|tdƒdƒdƒttƒtf|_tdƒ}|j||dƒdƒ|j|ddƒdƒttƒ|_tdƒ}||dƒ}|d|d|d|d|df}|j|d ƒ~|d|d|d|d|df}dS(Ntabcdeftctcdefiiiiitdtetft(R R"R#R$s( tlibt my_strchrRtrestypeRtargtypesRRR(RtstrchrtbuftrRtx1((s0/sys/lib/python2.7/ctypes/test/test_stringptr.pyttest_functions,s     )(RRRRR.(((s0/sys/lib/python2.7/ctypes/test/test_stringptr.pyRs  t__main__( tunittesttctypest _ctypes_testtCDLLt__file__R&tTestCaseRRtmain(((s0/sys/lib/python2.7/ctypes/test/test_stringptr.pyts   B