Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

Adding PACKAGE_PATCHLEVEL to an extension
I added these lines to my configure.ac file:

AC_SUBST([PACKAGE_PATCHLEVEL], [1.0.1])
AC_DEFINE_UNQUOTED(PACKAGE_PATCHLEVEL, "$PACKAGE_PATCHLEVEL")

This passes -DPACKAGE_PATCHLEVEL=\"1.0.1\" to the compiler.

My question is, should I call Tcl_PkgProvide("1.0.1") or just
Tcl_PkgProvide("1.0")?
Tcl and Tk pass 8.4 not 8.4.9, while the Tile extension passes 0.6.3 not
0.6.

Also, should my pkgIndex.tcl file call "package provide MyPkg 1.0.1" or
"package provide MyPkg 1.0"? It seems the Tile Windows pkgIndex.tcl file
uses 0.6 while the Tile Unix pkgIndex.tcl file uses 0.6.3.

-- Tim Baker



Report this thread to moderator Post Follow-up to this message
Old Post
Tim Baker
05-29-05 01:57 AM


Re: Adding PACKAGE_PATCHLEVEL to an extension
Tim Baker wrote:
> I added these lines to my configure.ac file:
>
> AC_SUBST([PACKAGE_PATCHLEVEL], [1.0.1])
> AC_DEFINE_UNQUOTED(PACKAGE_PATCHLEVEL, "$PACKAGE_PATCHLEVEL")
>
> This passes -DPACKAGE_PATCHLEVEL=\"1.0.1\" to the compiler.
>
> My question is, should I call Tcl_PkgProvide("1.0.1") or just
> Tcl_PkgProvide("1.0")?

You should Tcl_PkgProvide("1.0.1") ...
>
> Also, should my pkgIndex.tcl file call "package provide MyPkg 1.0.1" or
> "package provide MyPkg 1.0"?

The index script (pkgIndex.tcl file) should not [package provide]
anything at all.  It should use [package ifneeded] to trigger a
[load] of the appropriate shared library.  During the [load] the
Tcl_PkgProvide() call discussed above will take care of any
[package provide]-ing.

The [package ifneeded] command in your index script should get
the full version number, 1.0.1, as an argument.

--
| Don Porter          Mathematical and Computational Sciences Division |
| donald.porter@nist.gov             Information Technology Laboratory |
| http://math.nist.gov/~DPorter/                                  NIST |
 |_______________________________________
_______________________________|

Report this thread to moderator Post Follow-up to this message
Old Post
Don Porter
06-01-05 08:58 AM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

Tcl archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 06:34 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.