Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #70271
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!news.linkpendium.com!news.linkpendium.com!panix!not-for-mail |
|---|---|
| From | Grant Edwards <invalid@invalid.invalid> |
| Newsgroups | comp.lang.python |
| Subject | Re: Python, Linux, and the setuid bit |
| Date | Tue, 15 Apr 2014 15:05:25 +0000 (UTC) |
| Organization | PANIX Public Access Internet and UNIX, NYC |
| Lines | 24 |
| Message-ID | <lijhrl$709$1@reader1.panix.com> (permalink) |
| References | <534C4F8D.6090005@stoneleaf.us> <mailman.9263.1397525297.18130.python-list@python.org> |
| NNTP-Posting-Host | dsl.comtrol.com |
| X-Trace | reader1.panix.com 1397574325 7177 64.122.56.22 (15 Apr 2014 15:05:25 GMT) |
| X-Complaints-To | abuse@panix.com |
| NNTP-Posting-Date | Tue, 15 Apr 2014 15:05:25 +0000 (UTC) |
| User-Agent | slrn/1.0.1 (Linux) |
| Xref | csiph.com comp.lang.python:70271 |
Show key headers only | View raw
On 2014-04-15, Dave Angel <davea@davea.name> wrote:
> Your variable 'size' is declared as size_t, which is an integer
> the size of a pointer.
While that may always be true in practice (at least with gcc), I don't
think the C standard requires it. size_t is guaranteed to be unsigned
with at least 16 bits and sufficiently wide to represent the size of
any object. It might be possible, in theory, to have an architecture
that used 64-bit pointers but restricted each data space to 32-bits
and therefore could use 32-bit values for size_t.
If you want to declare an integer the size of a pointer, then the
choices are intptr_t (signed), uintptr_t (unsigned), and ptrdiff_t
(signed value representing the difference between to pointers).
> Not necessarily the same as an int.
Indeed.
--
Grant Edwards grant.b.edwards Yow! Is something VIOLENT
at going to happen to a
gmail.com GARBAGE CAN?
Back to comp.lang.python | Previous | Next — Previous in thread | Find similar | Unroll thread
Re:Python, Linux, and the setuid bit Dave Angel <davea@davea.name> - 2014-04-14 21:33 -0400 Re: Python, Linux, and the setuid bit Grant Edwards <invalid@invalid.invalid> - 2014-04-15 15:05 +0000
csiph-web