c_ptr.sa
Generated by gen_html_sa_files from ICSI. Contact gomes@icsi.berkeley.edu for details
-------------------------> GNU Sather - sourcefile <-------------------------
-- Copyright (C) 1995 by International Computer Science Institute --
-- This file is part of the GNU Sather library. It is free software; you may --
-- redistribute and/or modify it under the terms of the GNU Library General --
-- Public License (LGPL) as published by the Free Software Foundation; --
-- either version 2 of the license, or (at your option) any later version. --
-- This library is distributed in the hope that it will be useful, but --
-- WITHOUT ANY WARRANTY without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. See Doc/LGPL for more details. --
-- The license text is also available from: Free Software Foundation, Inc., --
-- 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA --
--------------> Please email comments to <bug-sather@gnu.org> <--------------
-- ANSI C interface - universal (void *) pointer type
-- Author: Benedict A. Gomes <gomes@samosa.ICSI.Berkeley.EDU>
immutable class C_PTR
immutable class C_PTR is
-- A pointer to void in C (void*)
-- Pointer arithmetic is missing for C pointer types. Feel free to
-- add it if it becomes necessary
include COMPARABLE;
zero:SAME is builtin C_PTR_ZERO; end;
is_eq(p:SAME):BOOL is builtin C_PTR_IS_EQ; end;
end;
partial class C_PTR_CONVERT
partial class C_PTR_CONVERT is
-- Partial class that implements conversions to and from C_PTR
-- i.e. (void *)
create(vptr:C_PTR):SAME is
-- create from void*
-- Convert (i.e. cast) "vptr" to be of the type of SAME
builtin CONVERT_FROM_C_PTR_CREATE_C_PTR;
end;
c_ptr:C_PTR is
-- Convert (i.e. cast) this pointer to be of type C_PTR
builtin CONVERT_TO_C_PTR;
end;
end;
immutable class C_SIZE_T
immutable class C_SIZE_T is
-- Corresponds to size_t
end;
immutable class C_PTRDIFF_T
immutable class C_PTRDIFF_T is
-- Corresponds to ptrdiff_t
end;