[Python-Dev] pthreads question: typedef ??? pthread_t and hacky return statements (original) (raw)
Greg Stein gstein@lyra.org
Fri, 18 Aug 2000 04:00:34 -0700
- Previous message: [Python-Dev] pthreads question: typedef ??? pthread_t and hacky return statements
- Next message: [Python-Dev] pthreads question: typedef ??? pthread_t and hacky return statements
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
That is a silly approach, Tim. This is exactly what autoconf is for. Using run-time logic to figure out something that is compile-time is Badness.
And the "but it will eventually be fixed" rationale is bogus. Gee, should we just start loading bogus patches into Python, knowing that everything will be fixed in the next version? Whoops. We forgot some. Oh, we can't change those now. Well, gee. Maybe Py3K will fix it.
I realize that you're only -0 on this, but it should be at least +0...
Cheers, -g
On Fri, Aug 18, 2000 at 04:10:01AM -0400, Tim Peters wrote:
-0 on autoconf for this.
I doubt that Trent ever needs to know more than in this one place the relative sizes of threadid and a long, and this entire function is braindead (hence will be gutted someday) anyway. Using the explicit test makes it obvious to everyone; winding back thru layers of autoconf crust makes it A Project and yet another goofy preprocessor symbol cluttering the code. > -----Original Message----- > From: Thomas Wouters [mailto:thomas@xs4all.net] > Sent: Friday, August 18, 2000 3:17 AM > To: Tim Peters > Cc: Trent Mick; python-dev@python.org > Subject: Re: [Python-Dev] pthreads question: typedef ??? pthreadt and > hacky return statements > > > On Thu, Aug 17, 2000 at 11:39:29PM -0400, Tim Peters wrote: > > > So how about a runtime test for what's actually important (and it's not > > Monterey!)? > > > > if (sizeof(threadid) <= sizeof(long))_ _> > return (long)threadid; > > > > End of problem, right? It's a cheap runtime test in a function > > whose speed isn't critical anyway. > > Note that this is what autoconf is for. It also helps to group all that > behaviour-testing code together, in one big lump noone pretends to > understand ;) > > -- > Thomas Wouters <thomas@xs4all.net> > > Hi! I'm a .signature virus! copy me into your .signature file to > help me spread!
Python-Dev mailing list Python-Dev@python.org http://www.python.org/mailman/listinfo/python-dev
-- Greg Stein, http://www.lyra.org/
- Previous message: [Python-Dev] pthreads question: typedef ??? pthread_t and hacky return statements
- Next message: [Python-Dev] pthreads question: typedef ??? pthread_t and hacky return statements
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]