Marco Maggi a écrit :
"Nicolas Cannasse" wrote:
acmp compares the addresses of a and b. It returns 0 if
they’re
the same, -1 if b>a, and 1 if a>b
of course it is "<" that evaluates to "-1"; and:
Is there something wrong here ?   b > a  ~=  a < b

Sorry, my eyes crossed in the wrong direction (and yours,
too). :)

Other questions...

* What does it  mean (quoting the doc): "the  context value
'this', like
  'true' or 'false', cannot be  modified directly" if later
it says "You
  can modify the  value of 'this' at runtime by  simply
assigning it to
  another value"?

Fixed

* In the specs the array example:

      $print(a["2"]); // null

  is wrong, because it raises an exception.

Fixed

* Sorry if I am rude, but why in heck "buffer_append_sub()" has an
  "intptr_t" as last argument rather than an "int"? :)

It's "int_val" as defined in Neko, which means a 64bit integer on 64-bits system.

The reason is that at several places you might want to use a difference between two char* in order to measure the length.

char *begin = "aaaaxbbb";
char *end = strstr(begin,"x");
buffer_append_sub(b,begin,end - begin);

The problem is that differences of pointers is an int_val.
Same for strlen()

So it's not a problem on 32-bit systems but save a cast on 64-bits system.

Nicolas


--
Neko : One VM to run them all
(http://nekovm.org)

Reply via email to