TIP #73: Export Tcl_GetTime in the Public API


TIP:73
Title:Export Tcl_GetTime in the Public API
Version:$Revision: 1.4 $
Author:Kevin Kenny <kennykb at acm dot org>
State:Final
Type:Project
Tcl-Version:8.4
Vote:Done
Created:Saturday, 03 November 2001

Abstract

This TIP proposes that the existing TclpGetTime function be renamed to be Tcl_GetTime and included in the published API.

Rationale

The Tcl library provides a uniform abstraction, TclpGetTime that is implemented on each of the platforms to retrieve absolute time in a Tcl_Time object. This function is highly useful outside the Tcl library itself, since it hides a very complex set of interfaces, particularly on Windows, where several hundred lines of code enable its use for high-precision measurements. For this reason, it ought to be made part of the public API.

Proposed Change

The existing TclpGetTime procedure shall be renamed to be Tcl_GetTime, and its declaration shall be added to tcl.decls.

 void TclpGetTime( Tcl_Time* timePtr );

A definition of TclpGetTime as a stub procedure that simply invokes Tcl_GetTime shall be retained in tclInt.decls for compatibility with existing Stubs-enabled extensions that invoke it.

This change requires no other change to the public headers; the Tcl_Time structure is already exported in tcl.h.

Copyright

Copyright © 2001 by Kevin B. Kenny. Distribution in whole or part, with or without annotations, is unlimited.


Powered by Tcl[Index] [History] [HTML Format] [Source Format] [LaTeX Format] [Text Format] [XML Format] [*roff Format (experimental)] [RTF Format (experimental)]

TIP AutoGenerator - written by Donal K. Fellows