[問題] 如何取得LP_c_char_p 型態?

看板Python作者 (鍵盤榜首)時間9年前 (2016/08/21 17:15), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/1
程式碼範例:http://www.pygame.org/wiki/GLSL_ARB_Example 一開始說59行 source = c_char_p(source) TypeError: bytes or integer address expected instead of str instance 將c_char_p改成c_wchar_p 換61行glShaderSourceARB(shader, 1, byref(source), byref(length)) ctypes.ArgumentError: argument 3: <class 'TypeError'>: expected LP_c_char_p instance instead of pointer to c_wchar_p 找不太到ctypes的文件 -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 140.116.16.235 ※ 文章網址: https://www.ptt.cc/bbs/Python/M.1471770903.A.C50.html
文章代碼(AID): #1NkN4NnG (Python)
文章代碼(AID): #1NkN4NnG (Python)