[mapguide-commits] r4747 - in trunk/MgDev: Oem/SWIGEx/Lib/php5 Oem/SWIGEx/Source/Modules Oem/SWIGEx/Win32 Web/src/MapGuideApi

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Wed Apr 7 12:19:25 EDT 2010


Author: brucedechant
Date: 2010-04-07 12:19:25 -0400 (Wed, 07 Apr 2010)
New Revision: 4747

Modified:
   trunk/MgDev/Oem/SWIGEx/Lib/php5/php5run.swg
   trunk/MgDev/Oem/SWIGEx/Source/Modules/php5.cxx
   trunk/MgDev/Oem/SWIGEx/Win32/Swig.exe
   trunk/MgDev/Web/src/MapGuideApi/MapGuideApiGen.xml
Log:
Fix for trac ticket 1292 - Update to PHP 5.3
http://trac.osgeo.org/mapguide/ticket/1292

Notes: 
- Fixed exceptions not being thrown in PHP by updating SWIG to generate PHP 5.3 code 
- Added missing exception classes 


Modified: trunk/MgDev/Oem/SWIGEx/Lib/php5/php5run.swg
===================================================================
--- trunk/MgDev/Oem/SWIGEx/Lib/php5/php5run.swg	2010-04-07 05:25:49 UTC (rev 4746)
+++ trunk/MgDev/Oem/SWIGEx/Lib/php5/php5run.swg	2010-04-07 16:19:25 UTC (rev 4747)
@@ -11,6 +11,7 @@
 #include "zend.h"
 #include "zend_API.h"
 #include "php.h"
+#include "zend_exceptions.h"
 
 #ifdef _WIN32
 #include <typeinfo.h>

Modified: trunk/MgDev/Oem/SWIGEx/Source/Modules/php5.cxx
===================================================================
--- trunk/MgDev/Oem/SWIGEx/Source/Modules/php5.cxx	2010-04-07 05:25:49 UTC (rev 4746)
+++ trunk/MgDev/Oem/SWIGEx/Source/Modules/php5.cxx	2010-04-07 16:19:25 UTC (rev 4747)
@@ -329,6 +329,7 @@
       Printf(s_wrappers, "\t\tobject_init_ex(obj,ptr_ce_swig_%s);\n", e->name.c_str());
       Printf(s_wrappers, "\t\tadd_property_zval(obj,\"_cPtr\",_cPtr);\n");
       Printf(s_wrappers, "\t\tEG(exception) = obj;\n");
+      Printf(s_wrappers, "\t\tzend_throw_exception_object(EG(exception) TSRMLS_CC);\n");
 
 	  Printf(s_wrappers, "\t}\n");
   }
@@ -2055,7 +2056,7 @@
         Printf(s_oinit,"if (! (ptr_ce_swig_%s=zend_register_internal_class_ex(&ce_swig_%s,ptr_ce_swig_%s,NULL TSRMLS_CC))) zend_error(E_ERROR,\"Error registering wrapper for class %s\");\n",
           shadow_classname,shadow_classname,GetChar(base.item, "sym:name"), shadow_classname);
       } else {
-        Printf(s_oinit,"if (! (ptr_ce_swig_%s=zend_register_internal_class_ex(&ce_swig_%s,NULL,NULL TSRMLS_CC))) zend_error(E_ERROR,\"Error registering wrapper for class %s\");\n",
+        Printf(s_oinit,"if (! (ptr_ce_swig_%s=zend_register_internal_class_ex(&ce_swig_%s,zend_exception_get_default(TSRMLS_C),NULL TSRMLS_CC))) zend_error(E_ERROR,\"Error registering wrapper for class %s\");\n", 
           shadow_classname,shadow_classname, shadow_classname);
       }
 	  if(enableRuntimeTypeChecking)

Modified: trunk/MgDev/Oem/SWIGEx/Win32/Swig.exe
===================================================================
(Binary files differ)

Modified: trunk/MgDev/Web/src/MapGuideApi/MapGuideApiGen.xml
===================================================================
--- trunk/MgDev/Web/src/MapGuideApi/MapGuideApiGen.xml	2010-04-07 05:25:49 UTC (rev 4746)
+++ trunk/MgDev/Web/src/MapGuideApi/MapGuideApiGen.xml	2010-04-07 16:19:25 UTC (rev 4747)
@@ -241,6 +241,8 @@
 
     <Header path="../../../Common/Geometry/Exception/CoordinateSystemComputationFailedException.h" />
     <Header path="../../../Common/Geometry/Exception/CoordinateSystemConversionFailedException.h" />
+    <Header path="../../../Common/Geometry/Exception/CoordinateSystemInitializationFailedException.h" />
+    <Header path="../../../Common/Geometry/Exception/CoordinateSystemLoadFailedException.h" />
     <Header path="../../../Common/Geometry/Exception/CoordinateSystemMeasureFailedException.h" />
     <Header path="../../../Common/Geometry/Exception/CoordinateSystemTransformFailedException.h" />
     <Header path="../../../Common/Geometry/Exception/GeometryException.h" />



More information about the mapguide-commits mailing list