develooper Front page | perl.cvs.parrot | Postings from January 2009

[svn:parrot] r35726 - in trunk: include/parrot src

From:
julianalbo
Date:
January 18, 2009 14:19
Subject:
[svn:parrot] r35726 - in trunk: include/parrot src
Message ID:
20090118221943.DACE5CB9AE@x12.develooper.com
Author: julianalbo
Date: Sun Jan 18 14:19:42 2009
New Revision: 35726

Modified:
   trunk/include/parrot/oo.h
   trunk/include/parrot/sub.h
   trunk/src/embed.c
   trunk/src/oo.c

Log:
fix c++ reserved word 'namespace' usage

Modified: trunk/include/parrot/oo.h
==============================================================================
--- trunk/include/parrot/oo.h	(original)
+++ trunk/include/parrot/oo.h	Sun Jan 18 14:19:42 2009
@@ -186,7 +186,7 @@
 PARROT_WARN_UNUSED_RESULT
 INTVAL Parrot_oo_register_type(PARROT_INTERP,
     ARGIN(PMC *name),
-    ARGIN(PMC *namespace))
+    ARGIN(PMC *_namespace))
         __attribute__nonnull__(1)
         __attribute__nonnull__(2)
         __attribute__nonnull__(3);
@@ -255,7 +255,7 @@
 #define ASSERT_ARGS_Parrot_oo_register_type __attribute__unused__ int _ASSERT_ARGS_CHECK = \
        PARROT_ASSERT_ARG(interp) \
     || PARROT_ASSERT_ARG(name) \
-    || PARROT_ASSERT_ARG(namespace)
+    || PARROT_ASSERT_ARG(_namespace)
 /* Don't modify between HEADERIZER BEGIN / HEADERIZER END.  Your changes will be lost. */
 /* HEADERIZER END: src/oo.c */
 

Modified: trunk/include/parrot/sub.h
==============================================================================
--- trunk/include/parrot/sub.h	(original)
+++ trunk/include/parrot/sub.h	Sun Jan 18 14:19:42 2009
@@ -100,7 +100,9 @@
 #undef SUB_FLAG
 
 #define Sub_comp_get_FLAGS(o) ((PMC_sub(o))->comp_flags)
-#define Sub_comp_flag_TEST(flag, o) (Sub_comp_get_FLAGS(o) & SUB_COMP_FLAG_ ## flag)
+
+#define Sub_comp_flag_TEST(flag, o) (Sub_comp_get_FLAGS((PMC *)o) & SUB_COMP_FLAG_ ## flag)
+
 #define Sub_comp_flag_SET(flag, o) (Sub_comp_get_FLAGS(o) |= SUB_COMP_FLAG_ ## flag)
 #define Sub_comp_flag_CLEAR(flag, o) (Sub_comp_get_FLAGS(o) &= ~(UINTVAL)(SUB_COMP_FLAG_ ## flag))
 

Modified: trunk/src/embed.c
==============================================================================
--- trunk/src/embed.c	(original)
+++ trunk/src/embed.c	Sun Jan 18 14:19:42 2009
@@ -863,7 +863,7 @@
         if (ft->fixups[i]->type == enum_fixup_sub) {
             const opcode_t ci      = ft->fixups[i]->offset;
             PMC           *sub_pmc = ct->constants[ci]->u.key;
-            Parrot_sub    *sub     = PMC_sub(sub_pmc);
+            Parrot_sub *sub        = PMC_sub(sub_pmc);
 
             if (sub->seg == cur_cs) {
                 const size_t offs = sub->start_offs;

Modified: trunk/src/oo.c
==============================================================================
--- trunk/src/oo.c	(original)
+++ trunk/src/oo.c	Sun Jan 18 14:19:42 2009
@@ -521,15 +521,15 @@
 
 PARROT_WARN_UNUSED_RESULT
 INTVAL
-Parrot_oo_register_type(PARROT_INTERP, ARGIN(PMC *name), ARGIN(PMC *namespace))
+Parrot_oo_register_type(PARROT_INTERP, ARGIN(PMC *name), ARGIN(PMC *_namespace))
 {
     ASSERT_ARGS(Parrot_oo_register_type)
     INTVAL type;
     const INTVAL typeid_exists = fail_if_type_exists(interp, name);
 
-    PMC *classobj = VTABLE_get_class(interp, namespace);
+    PMC *classobj = VTABLE_get_class(interp, _namespace);
     if (!PMC_IS_NULL(classobj)) {
-        STRING *classname = VTABLE_get_string(interp, namespace);
+        STRING *classname = VTABLE_get_string(interp, _namespace);
         Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_INVALID_OPERATION,
                 "Class %Ss already registered!\n",
                 string_escape_string(interp, classname));



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