S-Expression help

Werner Koch wk@gnupg.org
Tue, 03 Jun 2003 10:30:38 +0200


On Mon, 2 Jun 2003 12:22:37 -0400, Garrett Kajmowicz said:

>         GcrySexp *keyExp=NULL;
>         GcrySexp *keyParms=NULL;

          GCrySexp keyParms = NULL;

Define a variable of type GcrySexp and not a pointer tosuch a variable.

>         std::cout << "Initializing data structures\n";
>         tempString = "(genkey(elg(nbits 2048)))";
>         retVal=gcry_sexp_new (keyParms, tempString.c_str(),

          retVal=gcry_sexp_new (&keyParms, tempString.c_str(),

i.e. you must pass the address of keyParms to the function.  What you
did is the same as

          retVal=gcry_sexp_new (NULL, tempString.c_str(),

> Please reply by e-mail - I have yet to figure out how to subscribe to this 
> mailing list.

See here:

> http://lists.gnupg.org/mailman/listinfo/gcrypt-devel


hth,

 Werner



-- 
  Nonviolence is the greatest force at the disposal of
  mankind. It is mightier than the mightiest weapon of
  destruction devised by the ingenuity of man. -Gandhi