[svn:parrot] r47033 - in branches/ns_func_cleanup: docs ext/Parrot-Embed/lib/Parrot include/parrot src t/src

whiteknight at svn.parrot.org whiteknight at svn.parrot.org
Wed May 26 23:43:49 UTC 2010


Author: whiteknight
Date: Wed May 26 23:43:49 2010
New Revision: 47033
URL: https://trac.parrot.org/parrot/changeset/47033

Log:
Parrot_find_global_curr -> Parrot_ns_find_current_namespace_global

Modified:
   branches/ns_func_cleanup/docs/embed.pod
   branches/ns_func_cleanup/ext/Parrot-Embed/lib/Parrot/Embed.xs
   branches/ns_func_cleanup/include/parrot/global.h
   branches/ns_func_cleanup/src/global.c
   branches/ns_func_cleanup/t/src/embed.t
   branches/ns_func_cleanup/t/src/extend.t

Modified: branches/ns_func_cleanup/docs/embed.pod
==============================================================================
--- branches/ns_func_cleanup/docs/embed.pod	Wed May 26 23:42:04 2010	(r47032)
+++ branches/ns_func_cleanup/docs/embed.pod	Wed May 26 23:43:49 2010	(r47033)
@@ -288,12 +288,12 @@
 
 =over 4
 
-=item C<Parrot_PMC Parrot_find_global_cur(PARROT_INTERP, Parrot_String name)>
+=item C<Parrot_PMC Parrot_ns_find_current_namespace_global(PARROT_INTERP, Parrot_String name)>
 
 Find and return a global called C<name> in the current namespace.  Returns
 C<PMCNULL> if not found.
 
-=item C<Parrot_PMC Parrot_find_global_n(PARROT_INTERP, PMC namespace, Parrot_String name)>
+=item C<Parrot_PMC Parrot_ns_find_namespace_global(PARROT_INTERP, PMC namespace, Parrot_String name)>
 
 Search the namespace PMC C<namespace> for an object with name C<globalname>.
 Return the object, or NULL if not found.
@@ -467,7 +467,7 @@
 
         /* find the subroutine named "foo" in the global namespace */
         pstr = string_from_literal(interp, "foo");
-        sub = Parrot_find_global_cur(interp, pstr);
+        sub = Parrot_ns_find_current_namespace_global(interp, pstr);
 
         /* run foo(), which returns nothing */
 	Parrot_ext_call(interp, sub, "->");
@@ -709,11 +709,11 @@
 
 =item C<Parrot_find_encoding_converter>
 
-=item C<Parrot_find_global_cur>
+=item C<Parrot_ns_find_current_namespace_global>
 
 =item C<Parrot_find_global_k>
 
-=item C<Parrot_find_global_n>
+=item C<Parrot_ns_find_namespace_global>
 
 =item C<Parrot_find_global_op>
 

Modified: branches/ns_func_cleanup/ext/Parrot-Embed/lib/Parrot/Embed.xs
==============================================================================
--- branches/ns_func_cleanup/ext/Parrot-Embed/lib/Parrot/Embed.xs	Wed May 26 23:42:04 2010	(r47032)
+++ branches/ns_func_cleanup/ext/Parrot-Embed/lib/Parrot/Embed.xs	Wed May 26 23:43:49 2010	(r47033)
@@ -153,26 +153,26 @@
             ns_str += 2;
 
             if (!ns)
-                ns = Parrot_find_global_cur(real_interp,
+                ns = Parrot_ns_find_current_namespace_global(real_interp,
                     Parrot_str_new_constant(real_interp, prev));
             else
-                ns = Parrot_find_global_n(real_interp, ns,
+                ns = Parrot_ns_find_namespace_global(real_interp, ns,
                     Parrot_str_new_constant(real_interp, prev));
             prev    = ns_str;
         }
 
         if (!ns)
-            ns = Parrot_find_global_cur(real_interp,
+            ns = Parrot_ns_find_current_namespace_global(real_interp,
                 Parrot_str_new_constant(real_interp, prev));
         else
-            ns = Parrot_find_global_n(real_interp, ns,
+            ns = Parrot_ns_find_namespace_global(real_interp, ns,
                 Parrot_str_new_constant(real_interp, prev));
 
-        pmc          = Parrot_find_global_n(real_interp, ns, p_global);
+        pmc          = Parrot_ns_find_namespace_global(real_interp, ns, p_global);
         Safefree(ns_copy);
     }
     else
-        pmc         = Parrot_find_global_cur( real_interp, p_global );
+        pmc         = Parrot_ns_find_current_namespace_global( real_interp, p_global );
 
     RETVAL = make_pmc( aTHX_ ST(0), pmc );
 OUTPUT:

Modified: branches/ns_func_cleanup/include/parrot/global.h
==============================================================================
--- branches/ns_func_cleanup/include/parrot/global.h	Wed May 26 23:42:04 2010	(r47032)
+++ branches/ns_func_cleanup/include/parrot/global.h	Wed May 26 23:43:49 2010	(r47033)
@@ -19,14 +19,14 @@
 PARROT_EXPORT
 PARROT_WARN_UNUSED_RESULT
 PARROT_CAN_RETURN_NULL
-PMC * Parrot_find_global_cur(PARROT_INTERP,
+PMC * Parrot_ns_find_current_namespace_global(PARROT_INTERP,
     ARGIN_NULLOK(STRING *globalname))
         __attribute__nonnull__(1);
 
 PARROT_EXPORT
 PARROT_WARN_UNUSED_RESULT
 PARROT_CAN_RETURN_NULL
-PMC * Parrot_find_global_n(PARROT_INTERP,
+PMC * Parrot_ns_find_namespace_global(PARROT_INTERP,
     ARGIN_NULLOK(PMC *ns),
     ARGIN_NULLOK(STRING *globalname))
         __attribute__nonnull__(1);
@@ -144,9 +144,9 @@
         __attribute__nonnull__(1)
         __attribute__nonnull__(2);
 
-#define ASSERT_ARGS_Parrot_find_global_cur __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+#define ASSERT_ARGS_Parrot_ns_find_current_namespace_global __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
        PARROT_ASSERT_ARG(interp))
-#define ASSERT_ARGS_Parrot_find_global_n __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+#define ASSERT_ARGS_Parrot_ns_find_namespace_global __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
        PARROT_ASSERT_ARG(interp))
 #define ASSERT_ARGS_Parrot_find_global_op __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
        PARROT_ASSERT_ARG(interp) \

Modified: branches/ns_func_cleanup/src/global.c
==============================================================================
--- branches/ns_func_cleanup/src/global.c	Wed May 26 23:42:04 2010	(r47032)
+++ branches/ns_func_cleanup/src/global.c	Wed May 26 23:43:49 2010	(r47033)
@@ -475,7 +475,7 @@
 
 /*
 
-=item C<PMC * Parrot_find_global_n(PARROT_INTERP, PMC *ns, STRING *globalname)>
+=item C<PMC * Parrot_ns_find_namespace_global(PARROT_INTERP, PMC *ns, STRING *globalname)>
 
 Search the namespace PMC C<ns> for an object with name C<globalname>.
 Return the object, or NULL if not found.
@@ -491,9 +491,9 @@
 PARROT_WARN_UNUSED_RESULT
 PARROT_CAN_RETURN_NULL
 PMC *
-Parrot_find_global_n(PARROT_INTERP, ARGIN_NULLOK(PMC *ns), ARGIN_NULLOK(STRING *globalname))
+Parrot_ns_find_namespace_global(PARROT_INTERP, ARGIN_NULLOK(PMC *ns), ARGIN_NULLOK(STRING *globalname))
 {
-    ASSERT_ARGS(Parrot_find_global_n)
+    ASSERT_ARGS(Parrot_ns_find_namespace_global)
     PMC *res;
 
 #if DEBUG_GLOBAL
@@ -519,7 +519,7 @@
 
 /*
 
-=item C<PMC * Parrot_find_global_cur(PARROT_INTERP, STRING *globalname)>
+=item C<PMC * Parrot_ns_find_current_namespace_global(PARROT_INTERP, STRING *globalname)>
 
 Finds and returns the data time named C<globalname> in the current namespace.
 
@@ -531,11 +531,11 @@
 PARROT_WARN_UNUSED_RESULT
 PARROT_CAN_RETURN_NULL
 PMC *
-Parrot_find_global_cur(PARROT_INTERP, ARGIN_NULLOK(STRING *globalname))
+Parrot_ns_find_current_namespace_global(PARROT_INTERP, ARGIN_NULLOK(STRING *globalname))
 {
-    ASSERT_ARGS(Parrot_find_global_cur)
+    ASSERT_ARGS(Parrot_ns_find_current_namespace_global)
     PMC * const ns = Parrot_pcc_get_namespace(interp, CURRENT_CONTEXT(interp));
-    return Parrot_find_global_n(interp, ns, globalname);
+    return Parrot_ns_find_namespace_global(interp, ns, globalname);
 }
 
 /*
@@ -566,7 +566,7 @@
         Parrot_ns_get_namespace_keyed_str(interp,
                                        Parrot_get_ctx_HLL_namespace(interp),
                                        str_key);
-    return Parrot_find_global_n(interp, ns, globalname);
+    return Parrot_ns_find_namespace_global(interp, ns, globalname);
 }
 
 /*
@@ -652,7 +652,7 @@
         Parrot_ex_throw_from_c_args(interp, next, EXCEPTION_GLOBAL_NOT_FOUND,
             "Tried to get null global");
 
-    res = Parrot_find_global_n(interp, ns, globalname);
+    res = Parrot_ns_find_namespace_global(interp, ns, globalname);
     if (!res)
         res = PMCNULL;
 
@@ -693,10 +693,10 @@
     /* TT #1223 - walk up the scopes!  duh!! */
 
     if (PMC_IS_NULL(g))
-        g = Parrot_find_global_cur(interp, name);
+        g = Parrot_ns_find_current_namespace_global(interp, name);
 
     if (PMC_IS_NULL(g))
-        g = Parrot_find_global_n(interp, Parrot_get_ctx_HLL_namespace(interp), name);
+        g = Parrot_ns_find_namespace_global(interp, Parrot_get_ctx_HLL_namespace(interp), name);
 
     if (PMC_IS_NULL(g))
         return PMCNULL;

Modified: branches/ns_func_cleanup/t/src/embed.t
==============================================================================
--- branches/ns_func_cleanup/t/src/embed.t	Wed May 26 23:42:04 2010	(r47032)
+++ branches/ns_func_cleanup/t/src/embed.t	Wed May 26 23:43:49 2010	(r47033)
@@ -465,7 +465,7 @@
 
     /* locate function to run */
     smain = Parrot_str_new_constant(interp, "main");
-    entry = Parrot_find_global_cur(interp, smain);
+    entry = Parrot_ns_find_current_namespace_global(interp, smain);
 
     /* location of the entry */
     interp->current_cont = new_ret_continuation_pmc(interp, NULL);
@@ -530,7 +530,7 @@
 
     /* locate function to run */
     smain = Parrot_str_new_constant(interp, "main");
-    entry = Parrot_find_global_cur(interp, smain);
+    entry = Parrot_ns_find_current_namespace_global(interp, smain);
 
     /* location of the entry */
     interp->current_cont = new_ret_continuation_pmc(interp, NULL);
@@ -621,7 +621,7 @@
 
     /* locate function to run */
     smain = Parrot_str_new_constant(interp, "main");
-    entry = Parrot_find_global_cur(interp, smain);
+    entry = Parrot_ns_find_current_namespace_global(interp, smain);
 
     /* location of the entry */
     interp->current_cont = new_ret_continuation_pmc(interp, NULL);
@@ -712,7 +712,7 @@
 
     /* locate function to run */
     smain = Parrot_str_new_constant(interp, "main");
-    entry = Parrot_find_global_cur(interp, smain);
+    entry = Parrot_ns_find_current_namespace_global(interp, smain);
 
     /* location of the entry */
     interp->current_cont = new_ret_continuation_pmc(interp, NULL);
@@ -802,7 +802,7 @@
 
     /* locate function to run */
     smain = Parrot_str_new_constant(interp, "main");
-    entry = Parrot_find_global_cur(interp, smain);
+    entry = Parrot_ns_find_current_namespace_global(interp, smain);
 
     /* location of the entry */
     interp->current_cont = new_ret_continuation_pmc(interp, NULL);

Modified: branches/ns_func_cleanup/t/src/extend.t
==============================================================================
--- branches/ns_func_cleanup/t/src/extend.t	Wed May 26 23:42:04 2010	(r47032)
+++ branches/ns_func_cleanup/t/src/extend.t	Wed May 26 23:43:49 2010	(r47033)
@@ -382,7 +382,7 @@
     PMC           *sub, *arg;
 
     Parrot_pbc_load(interp, pf);
-    sub = Parrot_find_global_cur(interp, name);
+    sub = Parrot_ns_find_current_namespace_global(interp, name);
     Parrot_ext_call(interp, sub, "->");
     Parrot_eprintf(interp, "back\\n");
 
@@ -390,7 +390,7 @@
     Parrot_io_flush(interp, Parrot_io_STDERR(interp));
 
     name = Parrot_str_new_constant(interp, "_sub2");
-    sub  = Parrot_find_global_cur(interp, name);
+    sub  = Parrot_ns_find_current_namespace_global(interp, name);
     arg  = Parrot_pmc_new(interp, enum_class_String);
 
     Parrot_PMC_set_string_native(interp, arg,
@@ -440,7 +440,7 @@
     PMC           *sub, *arg;
 
     Parrot_pbc_load(interp, pf);
-    sub = Parrot_find_global_cur(interp, name);
+    sub = Parrot_ns_find_current_namespace_global(interp, name);
     Parrot_ext_call(interp, sub, "->");
     Parrot_eprintf(interp, "back\\n");
 
@@ -448,7 +448,7 @@
     Parrot_io_flush(interp, Parrot_io_STDERR(interp));
 
     name = Parrot_str_new_constant(interp, "_sub2");
-    sub  = Parrot_find_global_cur(interp, name);
+    sub  = Parrot_ns_find_current_namespace_global(interp, name);
     arg  = Parrot_pmc_new(interp, enum_class_String);
 
     Parrot_PMC_set_string_native(interp, arg,
@@ -517,7 +517,7 @@
     Parrot_Int     result;
 
     Parrot_pbc_load(interp, pf);
-    sub  = Parrot_find_global_cur(interp, name);
+    sub  = Parrot_ns_find_current_namespace_global(interp, name);
     arg  = Parrot_pmc_new(interp, enum_class_String);
 
     Parrot_PMC_set_string_native(interp, arg,
@@ -584,7 +584,7 @@
     Parrot_runloop jump_point;
 
     Parrot_pbc_load(interp, pf);
-    sub = Parrot_find_global_cur(interp, name);
+    sub = Parrot_ns_find_current_namespace_global(interp, name);
 
     if (setjmp(jump_point.resume)) {
         Parrot_eprintf(interp, "caught\\n");
@@ -714,7 +714,7 @@
     }
 
     foo_name = Parrot_str_new_constant( interp, "foo" );
-    sub      = Parrot_find_global_cur( interp, foo_name );
+    sub      = Parrot_ns_find_current_namespace_global( interp, foo_name );
 
     Parrot_ext_call(interp, sub, "->");
 
@@ -746,7 +746,7 @@
     pf = Parrot_pbc_read( interp, "$temp_pbc", 0 );
     Parrot_pbc_load( interp, pf );
 
-    sub      = Parrot_find_global_cur( interp, Parrot_str_new_constant( interp, "add" ) );
+    sub      = Parrot_ns_find_current_namespace_global( interp, Parrot_str_new_constant( interp, "add" ) );
     Parrot_ext_call(interp, sub, "II->I", 100, 200, &result);
     printf( "Result is %d.\\n", result );
 
@@ -778,7 +778,7 @@
     pf = Parrot_pbc_read( interp, "$temp_pbc", 0 );
     Parrot_pbc_load( interp, pf );
 
-    sub      = Parrot_find_global_cur( interp, Parrot_str_new_constant( interp, "add" ) );
+    sub      = Parrot_ns_find_current_namespace_global( interp, Parrot_str_new_constant( interp, "add" ) );
     Parrot_ext_call( interp, sub, "II->I", 100, 200, &result );
     printf( "Result is %d.\\n", result );
 


More information about the parrot-commits mailing list