Artifacts Associated With Ticket 1471633
Ticket change [1e4fd36707] (rid 90948) by nobody on 2006-04-17 08:50:03:
- assignee initialized to: "nobody"
- cmimetype initialized to: "text/plain"
- comment initialized to:
In procedure genStubs::parseDecl the first regular expression ^(.*)\((.*)\)$ should be replaced with either ^([^(]*)\((.*)\)$ or ^(.*?)\((.*)\)$, otherwise procedure declarations such as int privKey_create(pthread_key_t *key, void (*destr_function) (void *) are erroneously broken into prefix and args. József Németh NJG on wiki.tcl.tk
- foundin initialized to: "obsolete: 8.4.12"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "nobody"
- subsystem initialized to: "53. Configuration and Build Tools"
- title initialized to: "genStub.tcl erroneusly parses function declaration"
- type initialized to: "Bug"
Ticket change [dad291bfb1] (rid 107857) by dkf on 2006-04-17 20:59:04:
- assignee changed to: "dgp"
- icomment:
Logged In: YES user_id=79902 I don't quite understand the exact problem yet (your example isn't quite complete as far as I can see) but it is recommended (i.e. all Tcl APIs work this way) that all API functions that take a function pointer typed argument should name that type in their main header file, like this: typedef void (*FreeFuncPtr)(void *ptr); with that, you'd be parsing a declaration like this instead: void *privKey_create( pthread_key_t *key, FreeFuncPtr destr_function); Which should be perfectly OK from the stub generator's PoV. This applies doubly when the function parameter takes multiple arguments, of course... Workaround exists; lowering priority. - login: "dkf"
- mimetype: "text/plain"
- priority changed to: "4"
- username: "dkf"
Ticket change [03eacd75aa] (rid 119908) by dgp on 2006-04-17 23:38:15:
- assignee changed to: "jenglish"
- icomment:
Logged In: YES user_id=80530 jenglish has done the most work adapting genStubs utilities to work on source code other than Tcl and Tk.
- login: "dgp"
- mimetype: "text/plain"
- priority changed to: "3 Low"
- username: "dgp"
Ticket change [e268117515] (rid 87617) by jenglish on 2006-04-18 12:51:00:
- closedate changed to: "2006-04-18T05:51:00"
- closer changed to: "jenglish"
- icomment:
Logged In: YES user_id=68433 Agree with dkf's assessment -- genStubs.tcl isn't intended to parse arbitrary C function declarations, only a restricted subset of the syntax is supported. It's always possible to rewrite declarations in a form acceptable to genStubs.tcl by introducing intermediate typedefs (which is good style anyway...) [ As an aside: if you're generating a stubs table for your own extension, you might want to look at Tile's modified version of genStubs.tcl, in tile/tools/genStubs.tcl. This attempts to address some of the historical problems encountered with the core stubs tables. ]
- login: "jenglish"
- mimetype: "text/plain"
- status changed to: "Closed"
- username: "jenglish"
Ticket change [6245cea4df] (rid 92385) by dkf on 2006-04-18 15:01:15:
- resolution changed to: "Wont Fix"