gnash-commit
[Top][All Lists]
Advanced

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

[Gnash-commit] gnash server/asobj/LocalConnection.cpp server/a...


From: Rob Savoye
Subject: [Gnash-commit] gnash server/asobj/LocalConnection.cpp server/a...
Date: Sat, 05 Jan 2008 22:05:33 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Rob Savoye <rsavoye>    08/01/05 22:05:32

Modified files:
        server/asobj   : LocalConnection.cpp LocalConnection.h 
        .              : ChangeLog 

Log message:
                * server/asobj/LocalConnection.{cpp,h}:  Use boost::uint8_t
                instead of char *.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/LocalConnection.cpp?cvsroot=gnash&r1=1.17&r2=1.18
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/LocalConnection.h?cvsroot=gnash&r1=1.12&r2=1.13
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.5323&r2=1.5324

Patches:
Index: server/asobj/LocalConnection.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/asobj/LocalConnection.cpp,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -b -r1.17 -r1.18
--- server/asobj/LocalConnection.cpp    5 Jan 2008 09:36:55 -0000       1.17
+++ server/asobj/LocalConnection.cpp    5 Jan 2008 22:05:32 -0000       1.18
@@ -24,6 +24,7 @@
 #include <unistd.h>
 #include <cerrno>
 #include <cstring>
+#include <boost/cstdint.hpp> // for boost::?int??_t
 
 #include "VM.h"
 #include "URLAccessManager.h"
@@ -34,6 +35,7 @@
 #include "fn_call.h"
 #include "builtin_function.h"
 #include "amf.h"
+#include "lcshm.h"
 
 using namespace std;
 using namespace amf;
@@ -96,14 +98,13 @@
     GNASH_REPORT_FUNCTION;
 }
 
-#if 0 // {
 Listener::Listener()
     : _baseaddr(0)
 {
     GNASH_REPORT_FUNCTION;
 }
 
-Listener::Listener(char *x)
+Listener::Listener(boost::uint8_t *x)
 {
     GNASH_REPORT_FUNCTION;
     _baseaddr = x;
@@ -119,11 +120,11 @@
 {
     GNASH_REPORT_FUNCTION;
 
-    char *addr = _baseaddr + LC_LISTENERS_START;
-    char *item = addr;
+    boost::uint8_t *addr = _baseaddr + LC_LISTENERS_START;
+    boost::uint8_t *item = addr;
     // Walk to the end of the list
     while (*item != 0) {
-        item += strlen(item)+1;
+        item += strlen(reinterpret_cast<char *>(item))+1;
     }
     // Add ourselves to the list
     if (memcpy(item, name.c_str(), name.size()) == 0) {
@@ -137,19 +138,18 @@
 {
     GNASH_REPORT_FUNCTION;
 
-    char *addr = _baseaddr + LC_LISTENERS_START;
-
-    char *item = addr;
+    boost::uint8_t *addr = _baseaddr + LC_LISTENERS_START;
+    boost::uint8_t *item = addr;
     while (*item != 0) {
-        if (name == item) {
-            int len = strlen(item) + 1;
+        if (name.c_str() == reinterpret_cast<char *>(item)) {
+            int len = strlen(reinterpret_cast<char *>(item)) + 1;
             while (*item != 0) {
-                strcpy(item, item + len);
+                memcpy(item, item + len, len);
                 item += len + 1;
             }
             return true;
         }
-        item += strlen(item) + 1;
+        item += strlen(reinterpret_cast<char *>(item)) + 1;
     }
     return false;
 }
@@ -159,10 +159,10 @@
 {
     GNASH_REPORT_FUNCTION;
 
-    char *addr = _baseaddr + LC_LISTENERS_START;
+    boost::uint8_t *addr = _baseaddr + LC_LISTENERS_START;
 
     vector<string> *listeners = new vector<string>;
-    const char *item = addr;
+    const char *item = reinterpret_cast<char *>(addr);
     while (*item != 0) {
         listeners->push_back(item);
         item += strlen(item) + 1;
@@ -170,7 +170,6 @@
 
     return listeners;
 }
-#endif // }
 
 /// \brief Closes (disconnects) the LocalConnection object.
 void

Index: server/asobj/LocalConnection.h
===================================================================
RCS file: /sources/gnash/gnash/server/asobj/LocalConnection.h,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -b -r1.12 -r1.13
--- server/asobj/LocalConnection.h      5 Jan 2008 09:36:55 -0000       1.12
+++ server/asobj/LocalConnection.h      5 Jan 2008 22:05:32 -0000       1.13
@@ -15,10 +15,6 @@
 // along with this program; if not, write to the Free Software
 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
-// 
-//
-//
-
 #ifndef __LOCALCONNECTION_H__
 #define __LOCALCONNECTION_H__
 
@@ -28,24 +24,15 @@
 
 #include <string>
 #include <map>
+#include <boost/cstdint.hpp> // for boost::?int??_t
 
 #include "as_object.h" // for inheritance
 #include "fn_call.h"
-
-#ifdef NETWORK_CONN
-#include "network.h"
-#else
 #include "shm.h"
-#endif
 
 namespace gnash {
   
-#ifdef NETWORK_CONN
-class LocalConnection : public as_object {
-#else
 class LocalConnection : public as_object, Shm {
-#endif
-
 public:
     LocalConnection();
     ~LocalConnection();

Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.5323
retrieving revision 1.5324
diff -u -b -r1.5323 -r1.5324
--- ChangeLog   5 Jan 2008 17:53:35 -0000       1.5323
+++ ChangeLog   5 Jan 2008 22:05:32 -0000       1.5324
@@ -1,5 +1,8 @@
 2008-01-05  Rob Savoye  <address@hidden>
 
+       * server/asobj/LocalConnection.{cpp,h}:  Use boost::uint8_t
+       instead of char *.
+       
        * po/Makefile.am: Make the dircetories before trying to install in
        them.
        




reply via email to

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