Unless a newer version does (I use v2.0.4), no, I don't believe SWIG provides pattern-matching %ignore commands.  Each %ignore specifies a discrete element to be suppressed.

On 5/29/2014 8:50 AM, Joe Chan wrote:
Thank you for your reply. 

Actually, the function is within an include file that has hundreds of functions. I want to ignore some of them with something like:
%include "xxxx.h"
%ignore aFunctionInsideXXX

Is it possible?


On Thu, May 29, 2014 at 10:37 PM, Bob Hood <bhood2@comcast.net> wrote:
On 5/29/2014 8:09 AM, Joe Chan wrote:
I want to ignore the following function:
LEPT_DLL extern void setPixMemoryManager ( void * (  ( *allocator ) ( size_t ) ), void  (  ( *deallocator ) ( void * ) ) );

The following didn't work.
%ignore setPixMemoryManager;

You can wrap it away in the source, e.g.:

#ifndef SWIG
LEPT_DLL extern void setPixMemoryManager ( void * (  ( *allocator )...

However, you might just check to see if your %ignore directly appears after you include the header where the prototype is defined in your SWIG interface file.

Also, if setPixMemoryManager() is wrapped in a namespace, you'll need to include the namespace in your %ignore command.  E.g.:

  namespace Bob {
     LEPT_DLL extern void setPixMemoryManager ( void * (  ( *allocator )...


  %ignore Bob::setPixMemoryManager;

Time is money. Stop wasting it! Get your web API in 5 minutes.
Swig-user mailing list