Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!feeder.news-service.com!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!newsgate.cistron.nl!newsgate.news.xs4all.nl!194.109.133.84.MISMATCH!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.014 X-Spam-Evidence: '*H*': 0.97; '*S*': 0.00; 'function,': 0.07; 'python': 0.08; 'subject:ctypes': 0.09; 'argument': 0.15; 'received:209.85.213.174': 0.16; 'received:mail- yx0-f174.google.com': 0.16; 'subject:() ': 0.16; 'subject:function': 0.16; 'pass': 0.29; 'message- id:@mail.gmail.com': 0.29; 'ctypes': 0.30; 'typeerror:': 0.30; 'subject:?': 0.31; 'to:addr:python-list': 0.33; 'received:google.com': 0.38; 'received:209.85': 0.38; 'getting': 0.39; 'to:addr:python.org': 0.39; 'expects': 0.84 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; bh=oUnWc0exPQ3iiEFmKrGN0u68oc8+44nyQGoUbvgQvNo=; b=e3TeIrc3yKgOJRXrLq5sQlUXLM5JpsoQjkjgLxnizFZ/dKgHznoR/Sdrrlpvlq7t5T EpxbKNZsR9jjRJP/CBSbuPaX+05O/Q7gcnz0rNvS7/XTx8VNawSI/KcQT6TSVZWFWi2y 7n5wltG3uL7ZddiVPoEsYqm4BYeh96rBuXKHs= MIME-Version: 1.0 Date: Thu, 8 Sep 2011 20:18:54 -0700 Subject: buffer() as argument to ctypes function which expects c_void_p? From: Jack Bates To: python-list@python.org Content-Type: text/plain; charset=ISO-8859-1 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 4 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1315538338 news.xs4all.nl 2410 [2001:888:2000:d::a6]:46019 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:12997 How do you pass a Python buffer() value as an argument to a ctypes function, which expects a c_void_p argument? I keep getting TypeError: ctypes.ArgumentError: argument 2: : wrong type