[svn:parrot] r48407 - in branches/dynop_mapping: compilers/opsc/src/Ops src/ops

plobsing at svn.parrot.org plobsing at svn.parrot.org
Wed Aug 11 03:27:25 UTC 2010


Author: plobsing
Date: Wed Aug 11 03:27:05 2010
New Revision: 48407
URL: https://trac.parrot.org/parrot/changeset/48407

Log:
workaround mutually-referencing static var C++ issue

Modified:
   branches/dynop_mapping/compilers/opsc/src/Ops/Emitter.pm
   branches/dynop_mapping/src/ops/core_ops.c

Modified: branches/dynop_mapping/compilers/opsc/src/Ops/Emitter.pm
==============================================================================
--- branches/dynop_mapping/compilers/opsc/src/Ops/Emitter.pm	Wed Aug 11 03:00:11 2010	(r48406)
+++ branches/dynop_mapping/compilers/opsc/src/Ops/Emitter.pm	Wed Aug 11 03:27:05 2010	(r48407)
@@ -217,7 +217,8 @@
 
 {self.trans.defines(self)}
 
-static op_lib_t {self.bs}op_lib;
+/* XXX should be static, but C++ doesn't want to play ball */
+extern op_lib_t {self.bs}op_lib;
 
 |);
 
@@ -232,7 +233,8 @@
 ** op lib descriptor:
 */
 
-static op_lib_t | ~ self.bs ~ q|op_lib = {| ~ qq|
+/* XXX should be static, but C++ doesn't want to play ball */
+op_lib_t | ~ self.bs ~ q|op_lib = {| ~ qq|
   "{self.base}_ops",                /* name */
   "{self.suffix}",                  /* suffix */
   $core_type,                       /* core_type = PARROT_XX_CORE */

Modified: branches/dynop_mapping/src/ops/core_ops.c
==============================================================================
--- branches/dynop_mapping/src/ops/core_ops.c	Wed Aug 11 03:00:11 2010	(r48406)
+++ branches/dynop_mapping/src/ops/core_ops.c	Wed Aug 11 03:27:05 2010	(r48407)
@@ -28,7 +28,8 @@
 static int get_op(PARROT_INTERP, const char * name, int full);
 
 
-static op_lib_t core_op_lib;
+/* XXX should be static, but C++ doesn't want to play ball */
+extern op_lib_t core_op_lib;
 
 
 
@@ -26096,7 +26097,8 @@
 ** op lib descriptor:
 */
 
-static op_lib_t core_op_lib = {
+/* XXX should be static, but C++ doesn't want to play ball */
+op_lib_t core_op_lib = {
   "core_ops",                /* name */
   "",                  /* suffix */
   PARROT_FUNCTION_CORE,                       /* core_type = PARROT_XX_CORE */


More information about the parrot-commits mailing list