From 48c30847d9e1a89ec5f3b8ab63ff2451f730a4d0 Mon Sep 17 00:00:00 2001 From: Reini Urban Date: Fri, 2 Jan 2015 11:04:06 +0100 Subject: [PATCH] fix error: expected unqualified-id before string constant PARROT_EXPORT needs to be the first function attribute. See GH #1164. This error appears now with c++ compilers, because now returns_null is only now enabled. --- include/parrot/nci.h | 2 +- include/parrot/scheduler.h | 4 ++-- src/gc/fixed_allocator.c | 2 +- src/gc/fixed_allocator.h | 2 +- src/nci/signatures.c | 4 ++-- src/scheduler.c | 4 ++-- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/include/parrot/nci.h b/include/parrot/nci.h index f9662bfeec..1f5a88b486 100644 --- a/include/parrot/nci.h +++ b/include/parrot/nci.h @@ -48,8 +48,8 @@ void Parrot_nci_libffi_register(PARROT_INTERP) /* HEADERIZER BEGIN: src/nci/signatures.c */ /* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */ -PARROT_CANNOT_RETURN_NULL PARROT_EXPORT +PARROT_CANNOT_RETURN_NULL PMC * Parrot_nci_parse_signature(PARROT_INTERP, ARGIN(STRING *sig_str)) __attribute__nonnull__(1) __attribute__nonnull__(2); diff --git a/include/parrot/scheduler.h b/include/parrot/scheduler.h index b34ed04109..5cfa84dcfa 100644 --- a/include/parrot/scheduler.h +++ b/include/parrot/scheduler.h @@ -1,5 +1,5 @@ /* scheduler.h - * Copyright (C) 2007, Parrot Foundation. + * Copyright (C) 2007-2015, Parrot Foundation. * Overview: * Parrot concurrency scheduler header stuff * Data Structure and Algorithms: @@ -31,8 +31,8 @@ void Parrot_cx_check_alarms(PARROT_INTERP, ARGIN(PMC *scheduler)) __attribute__nonnull__(1) __attribute__nonnull__(2); -PARROT_CANNOT_RETURN_NULL PARROT_EXPORT +PARROT_CANNOT_RETURN_NULL opcode_t* Parrot_cx_run_scheduler(PARROT_INTERP, ARGIN(PMC *scheduler), ARGIN(opcode_t *next)) diff --git a/src/gc/fixed_allocator.c b/src/gc/fixed_allocator.c index a781ec41dd..59f78d0d8a 100644 --- a/src/gc/fixed_allocator.c +++ b/src/gc/fixed_allocator.c @@ -331,8 +331,8 @@ Parrot_gc_pool_destroy(SHIM_INTERP, ARGMOD(Pool_Allocator *pool)) mem_sys_free(pool); } -PARROT_CANNOT_RETURN_NULL PARROT_EXPORT +PARROT_CANNOT_RETURN_NULL void * Parrot_gc_pool_allocate(PARROT_INTERP, ARGMOD(Pool_Allocator * pool)) { diff --git a/src/gc/fixed_allocator.h b/src/gc/fixed_allocator.h index 2a7e2b3c6d..e090f89a5d 100644 --- a/src/gc/fixed_allocator.h +++ b/src/gc/fixed_allocator.h @@ -99,8 +99,8 @@ PARROT_EXPORT PARROT_CAN_RETURN_NULL struct Fixed_Allocator* Parrot_gc_fixed_allocator_new(PARROT_INTERP); -PARROT_CANNOT_RETURN_NULL PARROT_EXPORT +PARROT_CANNOT_RETURN_NULL void * Parrot_gc_pool_allocate(PARROT_INTERP, ARGMOD(Pool_Allocator * pool)) __attribute__nonnull__(1) __attribute__nonnull__(2) diff --git a/src/nci/signatures.c b/src/nci/signatures.c index a5dea37850..5ba4d7c830 100644 --- a/src/nci/signatures.c +++ b/src/nci/signatures.c @@ -1,5 +1,5 @@ /* -Copyright (C) 2010-2014, Parrot Foundation. +Copyright (C) 2010-2015, Parrot Foundation. =head1 NAME @@ -45,8 +45,8 @@ Parse a signature string to a NCI signature PMC. */ -PARROT_CANNOT_RETURN_NULL PARROT_EXPORT +PARROT_CANNOT_RETURN_NULL PMC * Parrot_nci_parse_signature(PARROT_INTERP, ARGIN(STRING *sig_str)) { diff --git a/src/scheduler.c b/src/scheduler.c index 5b4a02ce06..0782e1757a 100644 --- a/src/scheduler.c +++ b/src/scheduler.c @@ -1,5 +1,5 @@ /* -Copyright (C) 2007-2011, Parrot Foundation. +Copyright (C) 2007-2015, Parrot Foundation. =head1 NAME @@ -271,8 +271,8 @@ needs to be pre-empted. */ -PARROT_CANNOT_RETURN_NULL PARROT_EXPORT +PARROT_CANNOT_RETURN_NULL opcode_t* Parrot_cx_run_scheduler(PARROT_INTERP, ARGIN(PMC *scheduler), ARGIN(opcode_t *next)) {