Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 555C0431FD0 for ; Thu, 15 Sep 2011 11:12:23 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.699 X-Spam-Level: X-Spam-Status: No, score=-0.699 tagged_above=-999 required=5 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id GCsjdipyjVff for ; Thu, 15 Sep 2011 11:12:23 -0700 (PDT) Received: from mail-qy0-f174.google.com (mail-qy0-f174.google.com [209.85.216.174]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id E364E431FB6 for ; Thu, 15 Sep 2011 11:12:22 -0700 (PDT) Received: by qyk30 with SMTP id 30so5599179qyk.5 for ; Thu, 15 Sep 2011 11:12:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=fNoodYZYLlOGybtuJDLEdA6zo24a3IK79Ys0E+Oh1/E=; b=ddWKjRsXs4y+bdPJs5YnhWw+thBzXH4DNYO5x/B/WYbcDHbhX04vnwfGtkXiuJO3tW ha1yaYmH2R2SDNPF3n0jsVgByczZr/bM3UK3Oe0oKhZ3EWMwTzqU9FLvfV+hTfUuBuvT CEbOgS6irc2ZTQGMC3Xpl0IbjxE+l+Qiz8/o0= MIME-Version: 1.0 Received: by 10.229.67.148 with SMTP id r20mr1221873qci.64.1316110342344; Thu, 15 Sep 2011 11:12:22 -0700 (PDT) Sender: amdragon@gmail.com Received: by 10.229.2.201 with HTTP; Thu, 15 Sep 2011 11:12:22 -0700 (PDT) In-Reply-To: <1316108471.2201.24.camel@delen> References: <1315110898.32058.13.camel@delen> <87vct7t7m4.fsf@SSpaeth.de> <1315373219.32058.157.camel@delen> <8739g7gnb4.fsf@SSpaeth.de> <1316108471.2201.24.camel@delen> Date: Thu, 15 Sep 2011 14:12:22 -0400 X-Google-Sender-Auth: mZtlta18Zty1PUPs51SRaXv6laI Message-ID: Subject: Re: Python Unicode Was: Not much database creation error From: Austin Clements To: Martin Owens Content-Type: text/plain; charset=ISO-8859-1 Cc: Notmuch developer list , Paul Tagliamonte X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Sep 2011 18:12:23 -0000 This seems like a symptom of a much bigger problem. Shouldn't the bindings be checking or coercing the type of *every* argument that gets passed from the caller through to a ctypes-wrapped libnotmuch function? Otherwise, a simple type error in a caller, like passing a number instead of a string to one of the Python methods, would likely result in a segfault. On Thu, Sep 15, 2011 at 1:41 PM, Martin Owens wrote: > Hello Sebastian, > > I've attached a diff for some proposed changes to help make dealing with > unicode and strings in the bindings more regular. I noticed some of the > methods were protected and others were not. > > Let me know. > > Best Regards, Martin Owens > > On Thu, 2011-09-08 at 15:45 +0200, Sebastian Spaeth wrote: >> I have to admit, I am not deep into the libnotmuch/xapian internals, >> so >> I might be the wrong person to ask (I just do some python bindings to >> whatever libnotmuch provides).