From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/87099 Path: news.gmane.org!not-for-mail From: =?ISO-8859-15?Q?St=E9phane_Goujet?= Newsgroups: gmane.comp.tex.context Subject: Re: Attributes Date: Thu, 24 Apr 2014 01:39:32 +0200 (CEST) Message-ID: 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: MULTIPART/MIXED; BOUNDARY="8323328-614649012-1398296377=:20881" X-Trace: ger.gmane.org 1398295990 985 80.91.229.3 (23 Apr 2014 23:33:10 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 23 Apr 2014 23:33:10 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Thu Apr 24 01:33:05 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 1Wd6f2-0001cH-0w for gctc-ntg-context-518@m.gmane.org; Thu, 24 Apr 2014 01:33:04 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 7C48A1020F for ; Thu, 24 Apr 2014 01:33:03 +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 zCMCiGZkB2gB for ; Thu, 24 Apr 2014 01:33:03 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id A3EE11024D for ; Thu, 24 Apr 2014 01:32:59 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 83D67101E8 for ; Thu, 24 Apr 2014 01:32:54 +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 Cmrc6l2WslM8 for ; Thu, 24 Apr 2014 01:32:52 +0200 (CEST) Original-Received: from filter1-ams.mf.surf.net (filter1-ams.mf.surf.net [192.87.102.69]) by balder.ntg.nl (Postfix) with ESMTP id D35AE101E6 for ; Thu, 24 Apr 2014 01:32:44 +0200 (CEST) Original-Received: from smtp.smtpout.orange.fr (smtp06.smtpout.orange.fr [80.12.242.128]) by filter1-ams.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id s3NNWhHI009084 for ; Thu, 24 Apr 2014 01:32:44 +0200 Original-Received: from [192.168.1.7] ([86.217.195.30]) by mwinf5d64 with ME id tbYf1n00B0fpbTJ03bYjC1; Thu, 24 Apr 2014 01:32:43 +0200 X-ME-Helo: [192.168.1.7] X-ME-Auth: c3RlcGhhbmUuZ291amV0QHdhbmFkb28uZnI= X-ME-Date: Thu, 24 Apr 2014 01:32:43 +0200 X-ME-IP: 86.217.195.30 X-X-Sender: stephane@zbox.seix In-Reply-To: <5357F3A9.7060609@wxs.nl> User-Agent: Alpine 2.00 (LNX 1167 2008-08-23) X-Bayes-Prob: 0.0001 (Score 0, tokens from: ntg-context@ntg.nl, base:default, @@RPTN) X-CanIt-Geo: ip=80.12.242.128; country=FR; latitude=48.8600; longitude=2.3500; http://maps.google.com/maps?q=48.8600,2.3500&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0NLRzwI4u - a6cad836b7ed - 20140424 X-Scanned-By: CanIt (www . roaringpenguin . com) on 192.87.102.69 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:87099 Archived-At: This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --8323328-614649012-1398296377=:20881 Content-Type: TEXT/PLAIN; charset=iso-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable 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 retu= rn >> "nil" when I expect it should, but that is luatex problem (a check th= at >> 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 reaso= ns) Er... well, the other parameter is already checked, with a=20 check_isnode() which is heavier than a lua_isnumber() or lua_isnil(). It=20 is possible that the former one is not inlined when the other ones are (I= =20 did not verify either of these hypotheses). Anyway, if you do not want to make this change in the code, you should= =20 change the specification, because now, Luatex reference manual says "It=20 returns the value, or, if no match is found, nil", whereas when we supply= =20 an attribute number which is nil or not a number (therefore it cannot eve= r=20 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=20 result is unspecified", perhaps. Goodbye, St=E9phane. --8323328-614649012-1398296377=:20881 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________ --8323328-614649012-1398296377=:20881--