[Gridflow-cvs] [svn] commit: r4096 - /trunk/gridflow.h

gridflow-cvs at artengine.ca gridflow-cvs at artengine.ca
Fri Oct 3 15:48:28 EDT 2008


Author: matju
Date: Fri Oct  3 15:48:27 2008
New Revision: 4096

Log:
ARGS macro accepts null pointer arguments in case of freak accidents and stuff

Modified:
    trunk/gridflow.h

Modified: trunk/gridflow.h
==============================================================================
--- trunk/gridflow.h (original)
+++ trunk/gridflow.h Fri Oct  3 15:48:27 2008
@@ -826,7 +826,7 @@
 extern "C" void Init_gridflow ();
 extern Numop *op_add,*op_sub,*op_mul,*op_div,*op_mod,*op_shl,*op_and,*op_put;
 
-#define ARGS(OBJ) (OBJ->bself->binbuf_string().data())
+#define ARGS(OBJ) ((OBJ) ? (OBJ)->bself->binbuf_string().data() : "[null]")
 #define NOTEMPTY(_a_) if (!(_a_)) RAISE("in [%s], '%s' is empty",ARGS(this), #_a_);
 #define SAME_TYPE(_a_,_b_) if ((_a_)->nt != (_b_)->nt) RAISE("same type please (%s has %s; %s has %s)", \
 	#_a_, number_type_table[(_a_)->nt].name, \



More information about the Gridflow-cvs mailing list