Author: petdance
Date: Thu Feb 21 18:29:38 2008
New Revision: 25971
Modified:
trunk/languages/pugs/pmc/pugscapture.pmc
Log:
wrapper macro args
Modified: trunk/languages/pugs/pmc/pugscapture.pmc
==============================================================================
--- trunk/languages/pugs/pmc/pugscapture.pmc (original)
+++ trunk/languages/pugs/pmc/pugscapture.pmc Thu Feb 21 18:29:38 2008
@@ -185,23 +185,27 @@
/* rhs and lhs versions needed to avoid the msg "warning: use of cast
* expressions as lvalues is deprecated" Is there a better way?
*/
-#define siva_int(a) ((INTVAL) PMC_struct_val(a))
-#define siva_set_int(a, v) (PMC_struct_val(a) = (DPOINTER*) v)
-#define siva_ary(a) ((List*) PMC_data(a))
-#define siva_set_ary(a, v) PMC_data(a) = ((List*) v)
-#define siva_hash(a) ((siva*) PMC_pmc_val(a))->hash
-#define siva_set_hash(a, v) (((siva*) PMC_pmc_val(a))->hash) =((Hash*) v)
-#define siva_str(a) ((siva*) PMC_pmc_val(a))->s
-#define siva_set_str(a, v) (((siva*) PMC_pmc_val(a))->s) =((STRING*) v)
+#define siva_int(a) ((INTVAL) PMC_struct_val(a))
+#define siva_set_int(a, v) (PMC_struct_val(a) = (DPOINTER*) (v))
+
+#define siva_ary(a) ((List*) PMC_data(a))
+#define siva_set_ary(a, v) PMC_data(a) = ((List*) (v))
+
+#define siva_hash(a) ((siva*) PMC_pmc_val(a))->hash
+#define siva_set_hash(a, v) (((siva*) PMC_pmc_val(a))->hash) = ((Hash*) (v))
+
+#define siva_str(a) ((siva*) PMC_pmc_val(a))->s
+#define siva_set_str(a, v) (((siva*) PMC_pmc_val(a))->s) = ((STRING*) (v))
#define siva_siva(a) ((PMC*) PMC_pmc_val(a))
-#define siva_set_siva(a, v) (PMC_pmc_val(a)) = ((PMC*) v)
+#define siva_set_siva(a, v) (PMC_pmc_val(a)) = ((PMC*) (v))
+
#define siva_ary_create_if_void(i, a) { \
- if (!siva_ary(a)) siva_set_ary(a, list_new(i, enum_type_PMC)); \
+ if (!siva_ary(a)) siva_set_ary((a), list_new((i), enum_type_PMC)); \
}
#define siva_hash_create_if_void(i, a) { \
- if (!siva_hash(a)) parrot_new_hash_x(i, &siva_hash(a), \
+ if (!siva_hash(a)) parrot_new_hash_x((i), &siva_hash(a), \
enum_type_ptr, Hash_key_type_int, int_compare, key_hash_int); \
}
#define siva_str_create_if_void(i, a) { \