Now the loops are optimized away as well:
| ./pike -mmaster.pike lyslyskom16362790.pike 47 10
| Running 10 iterations on array of size 47
| ==-1 took 0.000s
| 0 took 0.000s
| has_index() took 0.000s
FYI: I doubt that anyone will notice (or care :-)), but I've just
renamed the few files in Pike that contained 8-bit characters, so that
they may be stored on filesystems that enforce UTF-8 encoding (eg HFS
or ZFS). The only files affected were the (deleted) file
The replacement machine has now been installed in it's new home. No
user accounts yet.
Right, my mistake.
On Sat, 8 Mar 2008, Arne Goedeke wrote:
Also with this particular case (when the first constant is wrong), pike
segfaults, apparently in f_function_name called by _sprintf in the last
backtrace frame of that
compile error.
I looked into it again and the problem seems to be that in
As some of you may have seen, a new Debian package of 7.6.112 was
uploaded the other day. I hope it will be well tested!
It failed to build on Alpha, however. Apparently a double free or
corruption happened in libjpeg (used by the Image.JPEG module) during
autogeneration og the documentation
I've now fixed the week vs year/day problems that showed up in the
testsuite.
I made a simple attempt to make 7.6 compatibility wrappers but it
failed, perhaps due to the resolver tricks in the Calendar module.
Shall we back out this again until someone manages to get working
compat?
Sounds reasonable.
Compilation failure:
Linking Gdbm
ld: fatal: library -lgdbm: not found
Looks like libgdbm is in some directory that gcc has in its default
library path, but that isn't in /usr/ccs/bin/ld's.
class X (int n)
{
private X `+ (int n2) {return X (n + n2);}
}
Here the function `+ is made private, but not the ability to use the
object in an addition; you can still do X(3) + 4. I think this should
Actually, you can't. lfuns that are private won't be used.
apply to these
Some digging reveals that that is very old code, probably from the
dark confused ages.
Sounds likely.
From ulpc/lib/master.lpc:
| object cast_to_object(string oname)
| {
| object ret;
|
| if(oname[0]=='/')
| oname=combine_path(getcwd(),oname);
|
|
Those tarballs are made by checking out a pristine pike tree from CVS,
and running make snapshot_export. In your case, preferrably checking
out with cvs -D iso8601timestamp, picking a suitable UTC time from
one of the appropriate times when export.pike tagged a stable tree.
For builds by pikefarm
what's the recommended approach for performing the equivalent of a
catch around apply_svalue()?
The most common approach is to use safe_apply_svalue(), it
unfortunately only supports two error handling modes; either passing
errors along to master()-handle_error(), or ignoring them entirely.
If
Btw, shouldn't throw_value and throw_severity really be fields in
the Pike_interpreter struct?
Yes, they probably should.
peek() can currently not be used there since it doesn't exist on
Windows (that ought to be fixed, though).
Fixed.
Note that neither read(0,1) nor peek() is used in that spot in 7.7;
only the !errno() check remains. That happened with this somewhat
cryptic comment:
revision 1.222
date:
Fixed.
i guess the docs for Stdio.File()-peek() should be fixed then,
because they say:
Returns 1 if there is data available to read
?? As far as I can see, the documentation says the following:
*! Check if there is data available to read,
*! or wait some time for available data to read.
*!
*!
using peek() instead of read(0,1) in __stdio_close_callback() and
adding
}else if (fds.revents (POLLERR | POLLHUP)){
ret=0;
to file_peek() fixed this issue for me.
Thanks for the suggestion. I've now
As you all probably know, I've been tinkering with the type system in
Pike 7.7 for a while now, and I've now reached the point of
implementing attributed types.
The question once again is which syntax do you prefer?:
GCC-style:
void __attribute(noreturn) error(string msg);
string
As you all probably know, I've been tinkering with the type system in
Pike 7.7 for a while now, and I've now reached the point of
implementing attributed types.
The question once again is which syntax do you prefer?:
GCC-style:
void __attribute(noreturn) error(string msg);
string
Trying to build a Pike with --with-long-long-int and --with-double-precision:
| /home/mirar/pike/build/linux-2.6.17-11-generic-x86_64/pike -DNOT_INSTALLED
-DPRECOMPILED_SEARCH_MORE
-m/home/mirar/pike/build/linux-2.6.17-11-generic-x86_64/master.pike
I've added some type checking support for sprintf() arguments:
New type checker:
sprintf(%s%i%f\n, 17, , 14.0);
Compiler Error: 1:Error in format string, i is not a format.
Compiler Error: 1:Bad argument 2 to sprintf.
Compiler Error: 1:Expected: object | string
Compiler Error: 1:Got
Hmm... Seems to work even for the more obscure cases:
typeof(class{});
(4) Result: function( : object(is HilfeInput()-__class_65709_0_line_1))
typeof(Stdio.Stat());
(5) Result: object(is _static_modules.files()-Stat)
Note that it will fall back to the old syntax if it fails to look up
the
Those who have monitored the Pike 7.7 CVS the last week or so, may
have noticed a few new type checking related functions. These are
intended to replace the current style of type checking where a
function type for the current call is created and then compared in
one pass against the declared type.
Looks like you need to add some more entries to the pollution filter
in aclocal.m4:AC_OUTPUT (line ~733 - ~748).
Anyway the precious variable stuff breaks the support for chained
configure scripts in combination with config.cache.
I used to do this to get a program of an external class in c:
...
push_text(Someclass);
SAFE_APPLY_MASTER(resolv, 1);
if (((struct svalue *)(Pike_sp - 1))-type != PIKE_T_PROGRAM) {
Pike_error(Could not resolv program Someclass.\n);
}
prog = ((struct svalue *)(Pike_sp - 1))-u.program;
The reason you run into a problem is probably that the program you
attempt to resolve uses the parent pointer, so you get a T_FUNCTION
rather than a T_PROGRAM. For what purpose do you need the program
pointer? For some purposes, program.c:program_from_svalue() may
return something you can use. You
Correct, as I said above, you probably want to use
parent_clone_object() (or just call the svalue directly). Do you
actually need the program pointer for something?
I need it to create an object of that program. I am a little confused
though. If there is a simpler solution to create an object
I'm considering adding support for differentiating between different
width strings to the type system. This whould be useful in tracking
down places where wide strings are passed where narrow strings are
expected. The question is what the syntax should be. Please note that
the syntax should aim at
In Pike, data type conversion is typically handled completely by
whatever type of object is being converted to, with no help from the
object being converted from. This is done in create(), and to convert
an array of integers treated as time_t seconds-since-the-Epoch, into
Calendar.Second objects,
401 - 431 of 431 matches
Mail list logo