From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/87103 Path: news.gmane.org!not-for-mail From: Hans Hagen Newsgroups: gmane.comp.tex.context Subject: Re: Attributes Date: Thu, 24 Apr 2014 10:00:16 +0200 Message-ID: <5358C490.3060207@wxs.nl> References: <20140420131459.7c23b8af@cuisine.seix> <53565AFF.4070304@wxs.nl> <5357812B.7010605@wxs.nl> <5357F3A9.7060609@wxs.nl> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1"; Format="flowed" Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1398326449 23653 80.91.229.3 (24 Apr 2014 08:00:49 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 24 Apr 2014 08:00:49 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Thu Apr 24 10:00:41 2014 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([5.39.185.229]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1WdEaH-00023M-01 for gctc-ntg-context-518@m.gmane.org; Thu, 24 Apr 2014 10:00:41 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 8CF7810284 for ; Thu, 24 Apr 2014 10:00:40 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 5oYav77SO+Ir for ; Thu, 24 Apr 2014 10:00:40 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id F2C5B10253 for ; Thu, 24 Apr 2014 10:00:34 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 3F66A101E8 for ; Thu, 24 Apr 2014 10:00:31 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id GywlLqXhAE9M for ; Thu, 24 Apr 2014 10:00:29 +0200 (CEST) Original-Received: from filter2-ams.mf.surf.net (filter2-ams.mf.surf.net [192.87.102.70]) by balder.ntg.nl (Postfix) with ESMTP id AA98A101E6 for ; Thu, 24 Apr 2014 10:00:24 +0200 (CEST) Original-Received: from smtp.ziggozakelijk.nl (D57D1DA2.static.ziggozakelijk.nl [213.125.29.162]) by filter2-ams.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id s3O80KVr004841 for ; Thu, 24 Apr 2014 10:00:24 +0200 X-Default-Received-SPF: pass (skip=loggedin (res=PASS)) x-ip-name=10.100.1.103; Original-Received: from [10.100.1.103] (unverified [10.100.1.103]) by pragma-net.nl (SurgeMail 6.5a2) with ESMTP id 2095-1713362 for ; Thu, 24 Apr 2014 10:00:18 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.4.0 In-Reply-To: X-Authenticated-User: hagen@controller-9 X-Bayes-Prob: 0.0001 (Score 0, tokens from: ntg-context@ntg.nl, base:default, @@RPTN) X-CanIt-Geo: ip=213.125.29.162; country=NL; region=Provincie Overijssel; city=Zwolle; latitude=52.5058; longitude=6.0858; http://maps.google.com/maps?q=52.5058,6.0858&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0QLRI0kKu - ebc72d5ab209 - 20140424 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) on 192.87.102.70 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.14 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: ntg-context-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:87103 Archived-At: On 4/24/2014 1:39 AM, St=E9phane Goujet wrote: > On Wed, 23 Apr 2014, Hans Hagen wrote: >> On 4/23/2014 3:07 PM, St=E9phane Goujet wrote: >>> There is still the problem that "node.has_attribute" does not return >>> "nil" when I expect it should, but that is luatex problem (a check that >>> a parameter is really an integer should be performed before calling >>> lua_tointeger), so I will change mailing-list in order to report it. >> that interface is unlikely to change (e.g. because of performance >> reasons) > > Er... well, the other parameter is already checked, with a > check_isnode() which is heavier than a lua_isnumber() or lua_isnil(). It > is possible that the former one is not inlined when the other ones are > (I did not verify either of these hypotheses). > > Anyway, if you do not want to make this change in the code, you > should change the specification, because now, Luatex reference manual > says "It returns the value, or, if no match is found, nil", whereas when > we supply an attribute number which is nil or not a number (therefore it > cannot ever match), it returns a non-nil value (which, moreover, means > "true"). > Something like adding "If id is nil or if id is not an integer, the > result is unspecified", perhaps. I've added a tracker item and will look at it later (no more changed at = this moment to the code as we're closing in on release i.e. texlive code = freeze). Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl ----------------------------------------------------------------- ___________________________________________________________________________= ________ If your question is of interest to others as well, please add an entry to t= he Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-cont= ext webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________= ________