Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix build with g++

git-svn-id: https://svn.parrot.org/parrot/trunk@45213 d31e2699-5ff4-0310-a27c-f18f2fbe73fe
  • Loading branch information...
commit f3faadb9ee098c688f4dc079ab7ec0bb71950f2d 1 parent 7d44117
@bacek bacek authored
View
4 include/parrot/call.h
@@ -253,8 +253,8 @@ void Parrot_pcc_parse_signature_string(PARROT_INTERP,
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)
View
10 src/call/args.c
@@ -1444,7 +1444,7 @@ Parrot_pcc_fill_params_from_varargs(PARROT_INTERP, ARGMOD_NULLOK(PMC *call_objec
/*
=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 @@ The two result strings should be passed in as references to a C string.
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 @@ Parrot_pcc_parse_signature_string(PARROT_INTERP, ARGIN(STRING *signature),
{
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);
View
19 src/call/pcc.c
@@ -75,10 +75,10 @@ Parrot_pcc_invoke_sub_from_c_args(PARROT_INTERP, ARGIN(PMC *sub_obj),
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 @@ Parrot_pcc_invoke_method_from_c_args(PARROT_INTERP, ARGIN(PMC* pmc),
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);
View
2  src/extend.c
@@ -1048,7 +1048,7 @@ Parrot_ext_call(PARROT_INTERP, ARGIN(Parrot_PMC sub_pmc),
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));
View
3  src/multidispatch.c
@@ -266,7 +266,8 @@ Parrot_mmd_multi_dispatch_from_c_args(PARROT_INTERP,
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);
Please sign in to comment.
Something went wrong with that request. Please try again.