Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
Tcl_PkgRequire(3)	     Tcl Library Procedures	       Tcl_PkgRequire(3)

________________________________________________________________________________

NAME
     Tcl_PkgRequire,   Tcl_PkgRequireEx,   Tcl_PkgRequireProc,	 Tcl_PkgPresent,
     Tcl_PkgPresentEx, Tcl_PkgProvide, Tcl_PkgProvideEx - package  version  con-
     trol

SYNOPSIS
     #include <tcl.h>

     const char *
     Tcl_PkgRequire(interp, name, version, exact)

     const char *
     Tcl_PkgRequireEx(interp, name, version, exact, clientDataPtr)

     int
     Tcl_PkgRequireProc(interp, name, objc, objv, clientDataPtr)

     const char *
     Tcl_PkgPresent(interp, name, version, exact)

     const char *
     Tcl_PkgPresentEx(interp, name, version, exact, clientDataPtr)

     int
     Tcl_PkgProvide(interp, name, version)

     int
     Tcl_PkgProvideEx(interp, name, version, clientData)

ARGUMENTS
     Tcl_Interp *interp (in)	       Interpreter  where  package  is needed or
				       available.

     const char *name (in)	       Name of package.

     const char *version (in)	       A version  specification  string  as  de-
				       scribed for package require.

     int exact (in)		       Non-zero  means	that only the particular
				       version specified by version  is  accept-
				       able.   Zero  means  that  newer versions
				       than version are also acceptable as  long
				       as  they have the same major version num-
				       ber as version.

     const void *clientData (in)       Arbitrary value to be associated with the
				       package.

     void *clientDataPtr (out)	       Pointer to place to store the value asso-
				       ciated with the matching package.  It  is
				       only  changed  if the pointer is not NULL
				       and the function completed  successfully.
				       The  storage can be any pointer type with
				       the same size as a void pointer.

     int objc (in)		       Number of requirements.

     Tcl_Obj* objv[] (in)	       Array of requirements.
________________________________________________________________________________

DESCRIPTION
     These procedures provide C-level interfaces to Tcl's  package  and  version
     management facilities.

     Tcl_PkgRequire is equivalent to the package require command, Tcl_PkgPresent
     is equivalent to the package present command, and Tcl_PkgProvide is equiva-
     lent to the package provide command.

     See the documentation for the Tcl commands for details on what these proce-
     dures do.

     If  Tcl_PkgPresent  or  Tcl_PkgRequire  complete successfully they return a
     pointer to the version string for the version of the package that	is  pro-
     vided in the interpreter (which may be different than version); if an error
     occurs they return NULL and leave an error message in the interpreter's re-
     sult.

     Tcl_PkgProvide returns TCL_OK if it completes successfully; if an error oc-
     curs  it returns TCL_ERROR and leaves an error message in the interpreter's
     result.

     Tcl_PkgProvideEx, Tcl_PkgPresentEx and Tcl_PkgRequireEx allow  the  setting
     and retrieving of the client data associated with the package. In all other
     respects they are equivalent to the matching functions.

     Tcl_PkgRequireProc  is  the  form	of package require handling multiple re-
     quirements. The other forms are  present  for  backward  compatibility  and
     translate their invocations to this form.

KEYWORDS
     package, present, provide, require, version

SEE ALSO
     package(n), Tcl_StaticPackage(3)

Tcl				       7.5		       Tcl_PkgRequire(3)

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=Tcl_PkgRequireEx.tcl86&sektion=3&manpath=FreeBSD+Ports+15.1.quarterly>

home | help