Overview
| Artifact ID: | 30c31063e2801f42254ce46c7c7095359f463195 |
|---|---|
| Ticket: | 1055668fffffffffffffffffffffffffffffffff
removal of exported internals from tclInt.h (EXTERN macro) |
| User & Date: | davygrvy on 2004-10-31 09:39:33 |
Changes
- icomment:
Logged In: YES user_id=7549 Ok, Tcl_Main returned to as is. New patch attached. This now uses TCL_INTERN() to declare internal functions not destined to be exported (nor imported by a client of the API). I decided to have the macro take the return type as an argument because some special attributes such as calling convention are placed after the return type. I'mjust trying to think into the future by doing this. I also decided to change the use of EXTERN within the tcl*Decl.h files to be TCL_EXTERN() and take the return type as an argument as well. To check the viability of this modification, I appended __cdecl to the #defines like so: #define TCL_EXTERN(RTYPE) TCL_EXT_EXTERN_C TCL_STORAGE_CLASS RTYPE __cdecl #define TCL_INTERN(RTYPE) TCL_INT_EXTERN_C RTYPE __cdecl The patch does not contain this, as I don't feel it isn't needed, but was only used as a check should one day, additional attributes might be placed there (see tip#60 prose; ignore the old patch it contains). Also used Daniel Steffen's idea to replace 'extern' with '__private_extern__' when declaring shared, but not exported functions. It is untested and will need a configure check to set HAVE_PRIVATE_EXTERN. I decided to place the #define of EXTERN within a #ifndef TCL_NO_DEPRECATED/#endif block. I can take it out of that block if it is thought not to be proper. Summary: It looks good and the three classes of public, private, and internal look clear to me now. I hope this helps others working on the core of the distinct difference between a private function in the Stubs table and an internal function not exported. That distinction was never clear before.
- login: "davygrvy"
- mimetype: "text/plain"
- username: "davygrvy"