Author: chromatic
Date: Sat May 26 19:24:23 2007
New Revision: 18657

Modified:
   trunk/lib/Parrot/Vtable.pm
   trunk/src/extend.c
   trunk/src/io/io.c
   trunk/tools/build/vtable_extend.pl

Log:
[External] Explicitly export external API symbols.

This may help Win32 pass more tests (though they're probably all skipped now).

Modified: trunk/lib/Parrot/Vtable.pm
==============================================================================
--- trunk/lib/Parrot/Vtable.pm  (original)
+++ trunk/lib/Parrot/Vtable.pm  Sat May 26 19:24:23 2007
@@ -358,7 +358,8 @@
 
         my $ret_type = find_type($return_type);
 
-        $protos .= sprintf "extern %s Parrot_PMC_%s( %s );\n", $ret_type, 
$name, $signature;
+        $protos .= sprintf "extern PARROT_API %s Parrot_PMC_%s( %s );\n",
+            $ret_type, $name, $signature;
 
         $funcs .= sprintf "/*
 
@@ -369,7 +370,8 @@
 
 */
 
-%s Parrot_PMC_%s( %s )
+PARROT_API %s
+Parrot_PMC_%s( %s )
 {
 ", ( $ret_type, $name, $signature ) x 2;
 

Modified: trunk/src/extend.c
==============================================================================
--- trunk/src/extend.c  (original)
+++ trunk/src/extend.c  Sat May 26 19:24:23 2007
@@ -1,5 +1,5 @@
 /*
-Copyright (C) 2001-2003, The Perl Foundation.
+Copyright (C) 2001-2007, The Perl Foundation.
 $Id$
 
 =head1 NAME
@@ -73,8 +73,9 @@
 
 */
 
-Parrot_String Parrot_PMC_get_string_intkey(Parrot_Interp interp,
-                                           Parrot_PMC pmc, Parrot_Int key) {
+PARROT_API Parrot_String
+Parrot_PMC_get_string_intkey(Parrot_Interp interp,
+                             Parrot_PMC pmc, Parrot_Int key) {
     Parrot_String retval;
     PARROT_CALLIN_START(interp);
     retval = VTABLE_get_string_keyed_int(interp, pmc, key);
@@ -95,8 +96,9 @@
 
 */
 
-void *Parrot_PMC_get_pointer_intkey(Parrot_Interp interp, Parrot_PMC pmc,
-                                    Parrot_Int key) {
+PARROT_API void *
+Parrot_PMC_get_pointer_intkey(Parrot_Interp interp, Parrot_PMC pmc,
+                              Parrot_Int key) {
     void *retval;
     PARROT_CALLIN_START(interp);
     retval = VTABLE_get_pointer_keyed_int(interp, pmc, key);
@@ -115,7 +117,8 @@
 
 */
 
-Parrot_PMC Parrot_PMC_get_pmc_intkey(Parrot_Interp interp, Parrot_PMC pmc,
+PARROT_API Parrot_PMC
+Parrot_PMC_get_pmc_intkey(Parrot_Interp interp, Parrot_PMC pmc,
                                      Parrot_Int key) {
     Parrot_PMC retval;
     PARROT_CALLIN_START(interp);
@@ -135,7 +138,8 @@
 
 */
 
-Parrot_Int Parrot_PMC_get_intval(Parrot_Interp interp, Parrot_PMC pmc) {
+PARROT_API Parrot_Int
+Parrot_PMC_get_intval(Parrot_Interp interp, Parrot_PMC pmc) {
     Parrot_Int retval;
     PARROT_CALLIN_START(interp);
     retval = VTABLE_get_integer(interp, pmc);
@@ -155,7 +159,8 @@
 
 */
 
-Parrot_Int Parrot_PMC_get_intval_intkey(Parrot_Interp interp, Parrot_PMC pmc,
+PARROT_API Parrot_Int
+Parrot_PMC_get_intval_intkey(Parrot_Interp interp, Parrot_PMC pmc,
                                         Parrot_Int key) {
     Parrot_Int retval;
     PARROT_CALLIN_START(interp);
@@ -176,7 +181,8 @@
 
 */
 
-Parrot_Int Parrot_PMC_get_intval_pmckey(Parrot_Interp interp, Parrot_PMC pmc,
+PARROT_API Parrot_Int
+Parrot_PMC_get_intval_pmckey(Parrot_Interp interp, Parrot_PMC pmc,
                                         Parrot_PMC key) {
     Parrot_Int retval;
     PARROT_CALLIN_START(interp);
@@ -196,7 +202,8 @@
 
 */
 
-Parrot_Float Parrot_PMC_get_numval(Parrot_Interp interp, Parrot_PMC pmc) {
+PARROT_API Parrot_Float
+Parrot_PMC_get_numval(Parrot_Interp interp, Parrot_PMC pmc) {
     Parrot_Float retval;
     PARROT_CALLIN_START(interp);
     retval =  VTABLE_get_number(interp, pmc);
@@ -216,7 +223,8 @@
 
 */
 
-Parrot_Float Parrot_PMC_get_numval_intkey(Parrot_Interp interp, Parrot_PMC pmc,
+PARROT_API Parrot_Float
+Parrot_PMC_get_numval_intkey(Parrot_Interp interp, Parrot_PMC pmc,
                                           Parrot_Int key) {
     Parrot_Float retval;
     PARROT_CALLIN_START(interp);
@@ -239,7 +247,7 @@
 
 */
 
-char *
+PARROT_API char *
 Parrot_PMC_get_cstring_intkey(Parrot_Interp interp, Parrot_PMC pmc,
                                     Parrot_Int key) {
     STRING *intermediate;
@@ -265,7 +273,7 @@
 
 */
 
-char *
+PARROT_API char *
 Parrot_PMC_get_cstring(Parrot_Interp interp, Parrot_PMC pmc) {
     STRING *intermediate;
     char   *retval;
@@ -295,7 +303,7 @@
 
 */
 
-char *
+PARROT_API char *
 Parrot_PMC_get_cstringn(Parrot_Interp interp, Parrot_PMC pmc,
                               Parrot_Int *length) {
     char *retval;
@@ -325,7 +333,7 @@
 
 */
 
-char *
+PARROT_API char *
 Parrot_PMC_get_cstringn_intkey(Parrot_Interp interp, Parrot_PMC pmc,
                                      Parrot_Int *length, Parrot_Int key) {
     char *retval;
@@ -351,7 +359,7 @@
 
 */
 
-void
+PARROT_API void
 Parrot_PMC_set_string(Parrot_Interp interp, Parrot_PMC pmc,
                       Parrot_String value) {
     PARROT_CALLIN_START(interp);
@@ -371,7 +379,7 @@
 
 */
 
-void
+PARROT_API void
 Parrot_PMC_set_string_intkey(Parrot_Interp interp, Parrot_PMC pmc,
                                   Parrot_Int key, Parrot_String value)
 {
@@ -392,7 +400,7 @@
 
 */
 
-void
+PARROT_API void
 Parrot_PMC_set_pmc_intkey(Parrot_Interp interp, Parrot_PMC pmc,
                                Parrot_Int key, Parrot_PMC value) {
     PARROT_CALLIN_START(interp);
@@ -412,7 +420,7 @@
 
 */
 
-void
+PARROT_API void
 Parrot_PMC_set_pmc_pmckey(Parrot_Interp interp, Parrot_PMC pmc,
                                Parrot_PMC key, Parrot_PMC value) {
     PARROT_CALLIN_START(interp);
@@ -432,7 +440,7 @@
 
 */
 
-void
+PARROT_API void
 Parrot_PMC_set_pointer_intkey(Parrot_Interp interp, Parrot_PMC pmc,
                                    Parrot_Int key, void *value) {
     PARROT_CALLIN_START(interp);
@@ -451,7 +459,7 @@
 
 */
 
-void
+PARROT_API void
 Parrot_PMC_set_intval(Parrot_Interp interp, Parrot_PMC pmc, Parrot_Int value) {
     PARROT_CALLIN_START(interp);
     VTABLE_set_integer_native(interp, pmc, value);
@@ -470,7 +478,7 @@
 
 */
 
-void
+PARROT_API void
 Parrot_PMC_set_intval_intkey(Parrot_Interp interp, Parrot_PMC pmc,
                                   Parrot_Int key, Parrot_Int value) {
     PARROT_CALLIN_START(interp);
@@ -489,7 +497,7 @@
 
 */
 
-void
+PARROT_API void
 Parrot_PMC_set_numval(Parrot_Interp interp, Parrot_PMC pmc, Parrot_Float 
value){
     PARROT_CALLIN_START(interp);
     VTABLE_set_number_native(interp, pmc, value);
@@ -508,7 +516,7 @@
 
 */
 
-void
+PARROT_API void
 Parrot_PMC_set_numval_intkey(Parrot_Interp interp, Parrot_PMC pmc,
                                   Parrot_Int key, Parrot_Float value) {
     PARROT_CALLIN_START(interp);
@@ -527,7 +535,7 @@
 
 */
 
-void
+PARROT_API void
 Parrot_PMC_set_cstring(Parrot_Interp interp, Parrot_PMC pmc, const char 
*value){
     PARROT_CALLIN_START(interp);
     VTABLE_set_string_native(interp, pmc,
@@ -547,7 +555,7 @@
 
 */
 
-void
+PARROT_API void
 Parrot_PMC_set_cstring_intkey(Parrot_Interp interp, Parrot_PMC pmc,
                                    Parrot_Int key, const char *value) {
     PARROT_CALLIN_START(interp);
@@ -568,7 +576,7 @@
 
 */
 
-void
+PARROT_API void
 Parrot_PMC_set_cstringn(Parrot_Interp interp, Parrot_PMC pmc,
                         const char *value, Parrot_Int length) {
     PARROT_CALLIN_START(interp);
@@ -589,7 +597,7 @@
 
 */
 
-void
+PARROT_API void
 Parrot_PMC_push_intval(Parrot_Interp interp, Parrot_PMC pmc,
                        Parrot_Int value) {
     PARROT_CALLIN_START(interp);
@@ -609,7 +617,7 @@
 
 */
 
-void
+PARROT_API void
 Parrot_PMC_push_numval(Parrot_Interp interp, Parrot_PMC pmc,
                        Parrot_Float value) {
     PARROT_CALLIN_START(interp);
@@ -629,7 +637,7 @@
 
 */
 
-void
+PARROT_API void
 Parrot_PMC_delete_pmckey(Parrot_Interp interp, Parrot_PMC pmc,
                               Parrot_PMC key) {
     PARROT_CALLIN_START(interp);
@@ -650,7 +658,7 @@
 
 */
 
-void
+PARROT_API void
 Parrot_PMC_set_cstringn_intkey(Parrot_Interp interp, Parrot_PMC pmc,
                                Parrot_Int key,
                                const char *value, Parrot_Int length) {
@@ -670,7 +678,8 @@
 
 */
 
-Parrot_PMC Parrot_PMC_new(Parrot_Interp interp, Parrot_Int type) {
+PARROT_API Parrot_PMC
+Parrot_PMC_new(Parrot_Interp interp, Parrot_Int type) {
     Parrot_PMC newpmc;
     PARROT_CALLIN_START(interp);
     newpmc = pmc_new_noinit(interp, type);
@@ -689,7 +698,8 @@
 
 */
 
-Parrot_Int Parrot_PMC_typenum(Parrot_Interp interp, const char *_class) {
+PARROT_API Parrot_Int
+Parrot_PMC_typenum(Parrot_Interp interp, const char *_class) {
     Parrot_Int retval;
     PARROT_CALLIN_START(interp);
     retval = pmc_type(interp, string_from_cstring(interp, _class, 0));
@@ -707,7 +717,7 @@
 
 */
 
-Parrot_PMC
+PARROT_API Parrot_PMC
 Parrot_PMC_null(void) {
     return PMCNULL;
 }
@@ -722,7 +732,7 @@
 
 */
 
-void
+PARROT_API void
 Parrot_free_cstring(char *string) {
     string_cstring_free(string);
 }
@@ -760,7 +770,7 @@
 
 */
 
-void*
+PARROT_API void*
 Parrot_call_sub(Parrot_Interp interp, Parrot_PMC sub,
                  const char *signature, ...)
 {
@@ -779,7 +789,7 @@
     return result;
 }
 
-Parrot_Int
+PARROT_API Parrot_Int
 Parrot_call_sub_ret_int(Parrot_Interp interp, Parrot_PMC sub,
                  const char *signature, ...)
 {
@@ -798,7 +808,7 @@
     return result;
 }
 
-Parrot_Float
+PARROT_API Parrot_Float
 Parrot_call_sub_ret_float(Parrot_Interp interp, Parrot_PMC sub,
                  const char *signature, ...)
 {
@@ -836,7 +846,7 @@
 
 */
 
-void *
+PARROT_API void *
 Parrot_call_method(Parrot_Interp interp, Parrot_PMC sub, Parrot_PMC obj,
                         Parrot_String method, const char *signature, ...)
 {
@@ -852,7 +862,7 @@
     return result;
 }
 
-Parrot_Int
+PARROT_API Parrot_Int
 Parrot_call_method_ret_int(Parrot_Interp interp, Parrot_PMC sub,
         Parrot_PMC obj, Parrot_String method, const char *signature, ...)
 {
@@ -868,7 +878,7 @@
     return result;
 }
 
-Parrot_Float
+PARROT_API Parrot_Float
 Parrot_call_method_ret_float(Parrot_Interp interp, Parrot_PMC sub,
         Parrot_PMC obj, Parrot_String method, const char *signature, ...)
 {
@@ -895,7 +905,7 @@
 
 */
 
-Parrot_Int
+PARROT_API Parrot_Int
 Parrot_get_intreg(Parrot_Interp interp, Parrot_Int regnum)
 {
     return REG_INT(regnum);
@@ -912,7 +922,7 @@
 
 */
 
-Parrot_Float
+PARROT_API Parrot_Float
 Parrot_get_numreg(Parrot_Interp interp, Parrot_Int regnum)
 {
     return REG_NUM(regnum);
@@ -929,7 +939,7 @@
 
 */
 
-Parrot_String
+PARROT_API Parrot_String
 Parrot_get_strreg(Parrot_Interp interp, Parrot_Int regnum)
 {
     return REG_STR(regnum);
@@ -946,7 +956,7 @@
 
 */
 
-Parrot_PMC
+PARROT_API Parrot_PMC
 Parrot_get_pmcreg(Parrot_Interp interp, Parrot_Int regnum)
 {
     return REG_PMC(regnum);
@@ -964,7 +974,7 @@
 
 */
 
-void
+PARROT_API void
 Parrot_set_intreg(Parrot_Interp interp, Parrot_Int regnum,
                   Parrot_Int value)
 {
@@ -983,7 +993,7 @@
 
 */
 
-void
+PARROT_API void
 Parrot_set_numreg(Parrot_Interp interp, Parrot_Int regnum,
                   Parrot_Float value)
 {
@@ -1002,7 +1012,7 @@
 
 */
 
-void
+PARROT_API void
 Parrot_set_strreg(Parrot_Interp interp, Parrot_Int regnum,
                   Parrot_String value)
 {
@@ -1021,7 +1031,7 @@
 
 */
 
-void
+PARROT_API void
 Parrot_set_pmcreg(Parrot_Interp interp, Parrot_Int regnum,
                   Parrot_PMC value)
 {
@@ -1047,7 +1057,7 @@
 
 */
 
-Parrot_String
+PARROT_API Parrot_String
 Parrot_new_string(Parrot_Interp interp,
                                 char *buffer, int length,
                                 const char * const encoding_name,
@@ -1071,7 +1081,8 @@
 
 */
 /*
-Parrot_Const_Encoding Parrot_find_encoding(Parrot_Interp interp,
+PARROT_API Parrot_Const_Encoding
+Parrot_find_encoding(Parrot_Interp interp,
                                            char *encoding_name) {
     return Parrot_encoding_lookup(encoding_name);
 }
@@ -1087,7 +1098,7 @@
 
 */
 
-Parrot_Language
+PARROT_API Parrot_Language
 Parrot_find_language(Parrot_Interp interp, char *language)
 {
     return 0;
@@ -1106,7 +1117,7 @@
 
 */
 
-void
+PARROT_API void
 Parrot_register_pmc(Parrot_Interp interp, Parrot_PMC pmc)
 {
     PARROT_CALLIN_START(interp);
@@ -1132,7 +1143,7 @@
 
 */
 
-void
+PARROT_API void
 Parrot_unregister_pmc(Parrot_Interp interp, Parrot_PMC pmc)
 {
     PARROT_CALLIN_START(interp);
@@ -1140,7 +1151,7 @@
     PARROT_CALLIN_END(interp);
 }
 
-Parrot_PMC
+PARROT_API Parrot_PMC
 Parrot_get_dod_registry(Parrot_Interp interp)
 {
     PMC *registry = interp->DOD_registry;
@@ -1165,7 +1176,7 @@
 
 */
 
-void
+PARROT_API void
 Parrot_PMC_set_vtable(Parrot_Interp interp, Parrot_PMC pmc,
                       Parrot_VTABLE vtable)
 {
@@ -1183,7 +1194,7 @@
 
 */
 
-Parrot_VTABLE
+PARROT_API Parrot_VTABLE
 Parrot_get_vtable(Parrot_Interp interp, Parrot_Int id)
 {
     return interp->vtables[id];

Modified: trunk/src/io/io.c
==============================================================================
--- trunk/src/io/io.c   (original)
+++ trunk/src/io/io.c   Sat May 26 19:24:23 2007
@@ -1204,7 +1204,7 @@
 
 */
 
-PMC *
+PARROT_API PMC *
 PIO_STDERR ID((Interp *interp))
 {
     return PIO_STDERR(interp);

Modified: trunk/tools/build/vtable_extend.pl
==============================================================================
--- trunk/tools/build/vtable_extend.pl  (original)
+++ trunk/tools/build/vtable_extend.pl  Sat May 26 19:24:23 2007
@@ -59,7 +59,7 @@
 print $OUT $header, <<'EOF';
 
 /*
-Copyright (C) 2001-2003, 2005, The Perl Foundation.
+Copyright (C) 2001-2007, The Perl Foundation.
 
 =head1 NAME
 

Reply via email to