Hiding C functions from export in R?

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Hiding C functions from export in R?

Kevin Smith
I have several dozen C functions that get wrapped in SWIG.  Almost all of them are simply used in structs as follows.  This generates the appropriate classes in all of the languages that I’m targeting.  However, in R, I get both the class definitions and the C function definitions exported.  I really don’t want the wrapped functions (connectionOpen and connectionDestroy, in this example) to show up independently.  Is there a way to prevent them from showing up, or at least prefix the C functions with some other arbitrary prefix to prevent them from showing up in tab-completion in R?

typedef struct Connection {
   %extend {
   Connection(char *hostname, int32_t port) {
      return connectionOpen(hostname, port);
   }
   ~Connection() {
      connectionDestroy($self);
   }
}

Kevin D Smith
[hidden email]



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Swig-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/swig-user