From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-Version: 1.0 In-Reply-To: <20121122123850.GA8106@dinah> References: <20121122123850.GA8106@dinah> Date: Thu, 22 Nov 2012 12:48:54 +0000 Message-ID: From: Charles Forsyth To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Content-Type: text/plain; charset=UTF-8 Subject: Re: [9fans] go forth and ulong no more! Topicbox-Message-UUID: e0339116-ead7-11e9-9d60-3106f5b1d025 this is just a sample, but there were other likely candidates: ./src/pkg/runtime/cpuprof.c: uintptr count; ./src/pkg/runtime/cpuprof.c: uintptr count; // tick count ./src/pkg/runtime/cpuprof.c: uintptr evicts; // eviction count ./src/pkg/runtime/cpuprof.c: uintptr lost; // lost ticks that need to be logged ./src/pkg/runtime/cpuprof.c: uintptr totallost; // total lost ticks ./src/pkg/runtime/zmprof_386.c:uintptr allocs; ./src/pkg/runtime/zmprof_386.c:uintptr frees; ./src/pkg/runtime/zmprof_386.c:uintptr alloc_bytes; ./src/pkg/runtime/zmprof_386.c:uintptr free_bytes; ./src/pkg/runtime/zmprof_386.c:uintptr recent_allocs; ./src/pkg/runtime/zmprof_386.c:uintptr recent_frees; ./src/pkg/runtime/zmprof_386.c:uintptr recent_alloc_bytes; ./src/pkg/runtime/zmprof_386.c:uintptr recent_free_bytes; ./src/pkg/runtime/zmprof_386.c:uintptr hash; ./src/pkg/runtime/zmprof_386.c:uintptr nstk; ./src/pkg/runtime/runtime.h: uintptr n; // number of parameters ./src/pkg/runtime/thread_netbsd.c: uintptr nout; ./src/pkg/runtime/cpuprof.c: uintptr nlog; On 22 November 2012 12:39, Anthony Martin wrote: > Charles Forsyth once said: >> On 22 November 2012 03:44, Bruce Ellis wrote: >> > uintptr in all over the go packages because it is right. >> >> I hadn't noticed that particularly, but having grep'd the source, I >> see it's also used for variables that are counters and numbers of >> things. > > Can you give an example? Nothing jumped out after a quick glance. > >> Is that right too? I suspect it's more out of expediency. Some other >> type usage looks odd too. int32 where int would do. Curious. > > Such as? The only one I can think of is (*os.File).Fd returning > a uintptr but that was changed from int for a reason (Windows). > > Cheers, > Anthony > >