Steve Fink: # Returning NULL seems rather harsh. Is this the right way? # # -- # Gimme a job! http://foxglove.dnsalias.org/~sfink/job.html # C, perl, networking, performance optimization, Java, XML. # # Index: classes/perlundef.pmc # =================================================================== # RCS file: /home/perlcvs/parrot/classes/perlundef.pmc,v # retrieving revision 1.10 # diff -u -r1.10 perlundef.pmc # --- classes/perlundef.pmc 10 Mar 2002 21:18:13 -0000 1.10 # +++ classes/perlundef.pmc 29 Mar 2002 06:04:38 -0000 # @@ -57,7 +57,7 @@ # # STRING* get_string () { # Parrot_warn(INTERP, PARROT_WARNINGS_UNDEF_FLAG, "Use # of uninitialized value in string context"); # - return NULL; # + return string_make(INTERP, "", 0, 0, 0, 0); # }
The string_* functions treat NULL and an empty string as equivalent, so this saves time in case we don't actually do anything with the string. # BOOLVAL get_bool () { --Brent Dax <[EMAIL PROTECTED]> @roles=map {"Parrot $_"} qw(embedding regexen Configure) #define private public --Spotted in a C++ program just before a #include