
hedgehogshiatus at gmail
Nov 8, 2009, 10:21 PM
Post #3 of 3
(113 views)
Permalink
|
|
Re: gpg-error.h possible(?) syntax error: #define GPG_ERR_SYSTEM_ERROR (1 << 15)
[In reply to]
|
|
On Fri, Nov 6, 2009 at 7:04 AM, Werner Koch <wk[at]gnupg.org> wrote: > On Sun, 1 Nov 2009 11:04, hedgehogshiatus[at]gmail.com said: > >> It is not clear to me if this is an problem with gpg-error.h or swig. > > The same code with some context: > > typedef enum > { > GPG_ERR_NO_ERROR = 0, > GPG_ERR_GENERAL = 1, > [...] > GPG_ERR_EOF = 16383, > > /* The following error codes are used to map system errors. */ > #define GPG_ERR_SYSTEM_ERROR (1 << 15) > GPG_ERR_E2BIG = GPG_ERR_SYSTEM_ERROR | 0, > GPG_ERR_EACCES = GPG_ERR_SYSTEM_ERROR | 1, > [...] > /* This is one more than the largest allowed entry. */ > GPG_ERR_CODE_DIM = 65536 > } gpg_err_code_t; > > Swig seems to tumble over the #define preprocessor directive within a > typedef for an enum. That is clearly a swig problem. > > To fix this you may run (a working) cpp over gpg-error.h and passing its > output to swig. ("cpp gpg-error.h >gpg-error.i") > Thank-you for the suggestion. Unfortunately cpp produced some code that `swig -ruby` choked on. A workaround was to generate xml output from `swig -c++` and process this xml file. Thanks again > > Shalom-Salam, > > Werner > > -- > Die Gedanken sind frei. Ausnahmen regelt ein Bundesgesetz. > > -- πόλλ' οἶδ ἀλώπηξ, ἀλλ' ἐχῖνος ἓν μέγα [.The fox knows many things, but the hedgehog knows one big thing.] Archilochus, Greek poet (c. 680 BC – c. 645 BC) http://wiki.hedgehogshiatus.com _______________________________________________ Gnupg-users mailing list Gnupg-users[at]gnupg.org http://lists.gnupg.org/mailman/listinfo/gnupg-users
|