gnash-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnash-commit] /srv/bzr/gnash/trunk r11006: create two arrays of init fu


From: rob
Subject: [Gnash-commit] /srv/bzr/gnash/trunk r11006: create two arrays of init functions, one for as2, and one for as3.
Date: Fri, 05 Jun 2009 12:22:51 -0600
User-agent: Bazaar (1.13.1)

------------------------------------------------------------
revno: 11006
committer: address@hidden
branch nick: trunk
timestamp: Fri 2009-06-05 12:22:51 -0600
message:
  create two arrays of init functions, one for as2, and one for as3.
modified:
  libcore/asobj/flash/xml/xml.am
=== modified file 'libcore/asobj/flash/xml/xml.am'
--- a/libcore/asobj/flash/xml/xml.am    2009-06-05 16:32:05 +0000
+++ b/libcore/asobj/flash/xml/xml.am    2009-06-05 18:22:51 +0000
@@ -17,17 +17,24 @@
 
 XMLdir = $(includedir)/gnash
 
+# This variable contains all classes in AS2 and AS3
 XML_SOURCES = flash/xml/xml_pkg.cpp
 XML_HEADERS = flash/xml/xml_pkg.h
 
+# This variable contains the classes only in AS3
+XML_SOURCES_AS3 = 
+XML_HEADERS_AS3 = 
+
+# ActionScript 2 has the XML class, which has been renamed in
+# ActionScript 3 to XMLDocument. They are the same class though.
 if BUILD_XMLDOCUMENT_AS3
 XML_SOURCES += flash/xml/XMLDocument_as.cpp
 XML_HEADERS += flash/xml/XMLDocument_as.h
 endif
 
 if BUILD_XMLNODETYPE_AS3
-XML_SOURCES += flash/xml/XMLNodeType_as.cpp
-XML_HEADERS += flash/xml/XMLNodeType_as.h
+XML_SOURCES_AS3 += flash/xml/XMLNodeType_as.cpp
+XML_HEADERS_AS3 += flash/xml/XMLNodeType_as.h
 endif
 
 if BUILD_XMLNODE_AS3
@@ -35,8 +42,8 @@
 XML_HEADERS += flash/xml/XMLNode_as.h
 endif
 
-libgnashasobjs_la_SOURCES += $(XML_SOURCES)
-noinst_HEADERS +=  $(XML_HEADERS) xmlclasses.h
+libgnashasobjs_la_SOURCES += $(XML_SOURCES) $(XML_SOURCES_AS3)
+noinst_HEADERS += $(XML_HEADERS) $(XML_HEADERS_AS3) xmlclasses.h
 
 # Build a header file that contains a generated array of *_init()
 # functions for the classes that are configured for this build, as
@@ -50,8 +57,22 @@
        echo "#define GNASH_ASOBJ_FLASH_XML_H 1" >> $${header}; \
        echo "#include \"sharedlib.h\"" >> $${header}; \
        echo "static gnash::SharedLib::initentry *as3xmlclasses[] = {" >> 
$${header}; \
-       oldway=`grep -l "_class_init" $(srcdir)/flash/xml/*_as.h`; \
-       newway=`grep -l "void init" $(srcdir)/flash/xml/*_as.h`; \
+       oldway=`cd $(srcdir) && grep -l "_class_init" $(XML_HEADERS_AS3)`; \
+       newway=`cd $(srcdir) && grep -l "void init"   $(XML_HEADERS_AS3)`; \
+       for i in $${oldway}; do \
+         item=`basename $$i | sed -e 's:\_as.h::'`; \
+         lowname="`echo $${item} | tr '[A-Z]' '[a-z]'`"; \
+         echo "        gnash::$${lowname}_class_init,"  >> $${header}; \
+       done; \
+       for i in $${newway}; do \
+         item=`basename $$i | sed -e 's:\_as.h::'`; \
+         echo "        gnash::$${item}_as::init,"  >> $${header}; \
+       done; \
+       echo '  0' >> $${header}; \
+       echo '};' >> $${header}; \
+       echo "static gnash::SharedLib::initentry *as2xmlclasses[] = {" >> 
$${header}; \
+       oldway=`cd $(srcdir) && grep -l "_class_init" $(XML_HEADERS)`; \
+       newway=`cd $(srcdir) && grep -l "void init"   $(XML_HEADERS)`; \
        for i in $${oldway}; do \
          item=`basename $$i | sed -e 's:\_as.h::'`; \
          lowname="`echo $${item} | tr '[A-Z]' '[a-z]'`"; \


reply via email to

[Prev in Thread] Current Thread [Next in Thread]