[svn:parrot] r45213 - in trunk: include/parrot src src/call

bacek at svn.parrot.org bacek at svn.parrot.org
Sat Mar 27 22:45:23 UTC 2010


Author: bacek
Date: Sat Mar 27 22:45:23 2010
New Revision: 45213
URL: https://trac.parrot.org/parrot/changeset/45213

Log:
Fix build with g++

Modified:
   trunk/include/parrot/call.h
   trunk/src/call/args.c
   trunk/src/call/pcc.c
   trunk/src/extend.c
   trunk/src/multidispatch.c

Modified: trunk/include/parrot/call.h
==============================================================================
--- trunk/include/parrot/call.h	Sat Mar 27 21:45:01 2010	(r45212)
+++ trunk/include/parrot/call.h	Sat Mar 27 22:45:23 2010	(r45213)
@@ -253,8 +253,8 @@
 PARROT_CAN_RETURN_NULL
 void Parrot_pcc_split_signature_string(PARROT_INTERP,
     ARGIN(const char *signature),
-    ARGMOD(char **arg_sig),
-    ARGMOD(char **return_sig))
+    ARGMOD(const char **arg_sig),
+    ARGMOD(const char **return_sig))
         __attribute__nonnull__(1)
         __attribute__nonnull__(2)
         __attribute__nonnull__(3)

Modified: trunk/src/call/args.c
==============================================================================
--- trunk/src/call/args.c	Sat Mar 27 21:45:01 2010	(r45212)
+++ trunk/src/call/args.c	Sat Mar 27 22:45:23 2010	(r45213)
@@ -1444,7 +1444,7 @@
 /*
 
 =item C<void Parrot_pcc_split_signature_string(PARROT_INTERP, const char
-*signature, char **arg_sig, char **return_sig)>
+*signature, const char **arg_sig, const char **return_sig)>
 
 Splits a full signature string and creates call and return signature strings.
 The two result strings should be passed in as references to a C string.
@@ -1456,10 +1456,10 @@
 PARROT_CAN_RETURN_NULL
 void
 Parrot_pcc_split_signature_string(PARROT_INTERP, ARGIN(const char *signature),
-        ARGMOD(char **arg_sig), ARGMOD(char **return_sig))
+        ARGMOD(const char **arg_sig), ARGMOD(const char **return_sig))
 {
     ASSERT_ARGS(Parrot_pcc_split_signature_string)
-    char *cur;
+    const char *cur;
     *arg_sig = signature;
 
     for (cur = signature; *cur != '\0'; cur++) {
@@ -1571,8 +1571,10 @@
 {
     ASSERT_ARGS(Parrot_pcc_parse_signature_string)
     char * const s = Parrot_str_to_cstring(interp, signature);
-    char *arg_sig, *ret_sig;
+    const char *arg_sig, *ret_sig;
+
     Parrot_pcc_split_signature_string(interp, s, &arg_sig, &ret_sig);
+
     *arg_flags    = PMCNULL;
     *return_flags = PMCNULL;
     parse_signature_string(interp, arg_sig, arg_flags);

Modified: trunk/src/call/pcc.c
==============================================================================
--- trunk/src/call/pcc.c	Sat Mar 27 21:45:01 2010	(r45212)
+++ trunk/src/call/pcc.c	Sat Mar 27 22:45:23 2010	(r45213)
@@ -75,10 +75,10 @@
         ARGIN(const char *sig), ...)
 {
     ASSERT_ARGS(Parrot_pcc_invoke_sub_from_c_args)
-    PMC    *call_obj;
-    va_list args;
-    char   *arg_sig, *ret_sig;
-    PMC    *old_call_obj = Parrot_pcc_get_signature(interp, CURRENT_CONTEXT(interp));
+    PMC         *call_obj;
+    va_list      args;
+    const char  *arg_sig, *ret_sig;
+    PMC         *old_call_obj = Parrot_pcc_get_signature(interp, CURRENT_CONTEXT(interp));
 
     Parrot_pcc_split_signature_string(interp, sig, &arg_sig, &ret_sig);
 
@@ -224,11 +224,12 @@
         ARGIN(const char *signature), ...)
 {
     ASSERT_ARGS(Parrot_pcc_invoke_method_from_c_args)
-    PMC    *call_obj;
-    PMC    *sub_obj;
-    va_list args;
-    char *arg_sig, *ret_sig;
-    PMC    *old_call_obj = Parrot_pcc_get_signature(interp, CURRENT_CONTEXT(interp));
+    PMC        *call_obj;
+    PMC        *sub_obj;
+    va_list     args;
+    const char *arg_sig, *ret_sig;
+    PMC        *old_call_obj = Parrot_pcc_get_signature(interp, CURRENT_CONTEXT(interp));
+
     Parrot_pcc_split_signature_string(interp, signature, &arg_sig, &ret_sig);
 
     va_start(args, signature);

Modified: trunk/src/extend.c
==============================================================================
--- trunk/src/extend.c	Sat Mar 27 21:45:01 2010	(r45212)
+++ trunk/src/extend.c	Sat Mar 27 22:45:23 2010	(r45213)
@@ -1048,7 +1048,7 @@
     ASSERT_ARGS(Parrot_ext_call)
     va_list args;
     PMC  *call_obj;
-    char *arg_sig, *ret_sig;
+    const char *arg_sig, *ret_sig;
 
     PMC  *old_call_obj = Parrot_pcc_get_signature(interp,
         CURRENT_CONTEXT(interp));

Modified: trunk/src/multidispatch.c
==============================================================================
--- trunk/src/multidispatch.c	Sat Mar 27 21:45:01 2010	(r45212)
+++ trunk/src/multidispatch.c	Sat Mar 27 22:45:23 2010	(r45213)
@@ -266,7 +266,8 @@
     ASSERT_ARGS(Parrot_mmd_multi_dispatch_from_c_args)
     PMC *call_obj, *sub;
     va_list args;
-    char *arg_sig, *ret_sig;
+    const char *arg_sig, *ret_sig;
+
     Parrot_pcc_split_signature_string(interp, sig, &arg_sig, &ret_sig);
 
     va_start(args, sig);


More information about the parrot-commits mailing list