From jumpinjackie at gmail.com Wed May 30 16:17:26 2018 From: jumpinjackie at gmail.com (Jackie Ng) Date: Wed, 30 May 2018 16:17:26 -0700 (MST) Subject: [mapguide-internals] For review: Ticket 2781 Message-ID: <1527722246210-0.post@n6.nabble.com> Hi All, I've attached a patch for ticket 2781 (https://trac.osgeo.org/mapguide/ticket/2781) I've been experimenting in an external sandbox with using vanilla SWIG to generate bindings for the MapGuide API, with an eye towards finally moving off of PHP 5.6 (which is EOL in december) to PHP 7.2. One small annoyance in my current work is that the current MapGuide common header layout leaks out ACE and xerces, which introduces additional hacks and workarounds especially for ACE where it collides with PHP on a few certain typedefs. This patch reduces that annoyance by tightening up the encapsulation of the MapGuide common headers by introducing a new SWIG_PUBLIC_API symbol, which is used to: 1. #ifdef out any trace of xerces. Where xerces types are referenced, they are forward-declared away. 2. #ifdef out a whole lot of ACE headers and forward-declare away whatever ACE types we can. Unfortunately, one ACE header still has to be leaked out, which the one for ACE_Recursive_Thread_Mutex as it is present as a class member on some publicly exported types. The patch adds SWIG_PUBLIC_API to the .net/Java/PHP binding projects. The other server/webtier consumer projects do not define this symbol, so they still see the full set of ACE/xerces headers. This patch slightly broke the SWIG C++ glue code generation for the current .net wrapper (list was un-qualified), so SWIG has been patched up to emit the correct code (use std::list) there as well. Please review. Thanks. - Jackie -- Sent from: http://osgeo-org.1560.x6.nabble.com/MapGuide-Internals-f4209935.html