[C++-sig] [pybindgen] How to wrap char** argv[]?

stefano franchi stefano.franchi at gmail.com
Thu Mar 12 17:05:52 CET 2015


[I posted the same question on Ubuntu's Launchpad's answers site, where
earlier discussions of pybindgen took place. However, there seems to be no
activity on that site, so i am reposting here]

Problem with pybindgen:

I stumbled upon a library that includes a function using pointers to the
standard main function's arguments, and therefore uses a signature of
char** argv[] (that is, a pointer to the standard char* argv[]):

in main I have the standard signature with reference to its arguments:

int main( int argc, char* argv[] )
{
  // initialize libstage - call this first
  Stg::Init( &argc, &argv );

----------etc.-----------------

and then the signature of the called function becomes:

  void Init( int* argc, char** argv[] );

---------------------------------

Given this situation, which parameter am I supposed to pass to
add_function('Init')?
I saw the answer how to pass char** argv, but I am not sure it is
applicable here, as I don't understand the code in that answer too well, I
am afraid.

Thanks,

Stefano
-- 
__________________________________________________
Stefano Franchi

stefano.franchi at gmail.com <stefano at tamu.edu>
http://stefano.cleinias.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/cplusplus-sig/attachments/20150312/8c9f29ee/attachment.html>


More information about the Cplusplus-sig mailing list