develooper Front page | perl.cvs.parrot | Postings from December 2008

[svn:parrot] r34525 - trunk/compilers/imcc

From:
infinoid
Date:
December 28, 2008 14:35
Subject:
[svn:parrot] r34525 - trunk/compilers/imcc
Message ID:
20081228223530.42CC8CB9FA@x12.develooper.com
Author: infinoid
Date: Sun Dec 28 14:35:29 2008
New Revision: 34525

Modified:
   trunk/compilers/imcc/main.c

Log:
[IMCC] Add NULLOK to a couple of function arguments.
These arguments can reasonably be NULL (and are sometimes NULL during the
course of normal operation), yet didn't have the NULLOK flag set.
(Found by the headerizer NONNULL assert() patch.)

Modified: trunk/compilers/imcc/main.c
==============================================================================
--- trunk/compilers/imcc/main.c	(original)
+++ trunk/compilers/imcc/main.c	Sun Dec 28 14:35:29 2008
@@ -45,10 +45,9 @@
 
 static void compile_to_bytecode(PARROT_INTERP,
     ARGIN(const char * const sourcefile),
-    ARGIN(const char * const output_file))
+    ARGIN_NULLOK(const char * const output_file))
         __attribute__nonnull__(1)
-        __attribute__nonnull__(2)
-        __attribute__nonnull__(3);
+        __attribute__nonnull__(2);
 
 static void determine_input_file_type(PARROT_INTERP,
     ARGIN(const char * const sourcefile))
@@ -77,11 +76,10 @@
 
 static void imcc_run_pbc(PARROT_INTERP,
     int obj_file,
-    ARGIN(const char *output_file),
+    ARGIN_NULLOK(const char *output_file),
     int argc,
     ARGIN(char **argv))
         __attribute__nonnull__(1)
-        __attribute__nonnull__(3)
         __attribute__nonnull__(5);
 
 static void imcc_write_pbc(PARROT_INTERP, ARGIN(const char *output_file))
@@ -764,7 +762,7 @@
 */
 
 static void
-imcc_run_pbc(PARROT_INTERP, int obj_file, ARGIN(const char *output_file),
+imcc_run_pbc(PARROT_INTERP, int obj_file, ARGIN_NULLOK(const char *output_file),
         int argc, ARGIN(char **argv))
 {
     if (IMCC_INFO(interp)->imcc_warn)
@@ -917,7 +915,7 @@
 static void
 compile_to_bytecode(PARROT_INTERP,
                     ARGIN(const char * const sourcefile),
-                    ARGIN(const char * const output_file))
+                    ARGIN_NULLOK(const char * const output_file))
 {
     PackFile *pf;
     yyscan_t  yyscanner = IMCC_INFO(interp)->yyscanner;



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About