Home My Page Projects Code Snippets Project Openings SML/NJ
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files

SCM Repository

[smlnj] Diff of /sml/trunk/src/ml-nlffi-lib/c.sig
ViewVC logotype

Diff of /sml/trunk/src/ml-nlffi-lib/c.sig

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1021, Wed Jan 16 20:33:57 2002 UTC revision 1031, Mon Jan 21 22:15:18 2002 UTC
# Line 28  Line 28 
28    
29      (* an alternative "light-weight" version that does not carry RTTI at      (* an alternative "light-weight" version that does not carry RTTI at
30       * the cost of requiring explicit passing of RTTI for certain operations *)       * the cost of requiring explicit passing of RTTI for certain operations *)
31      type ('t, 'c) obj'      eqtype ('t, 'c) obj'
32    
33      (* constness property, to be substituted for 'c *)      (* constness property, to be substituted for 'c *)
34      type ro and rw      type ro and rw
# Line 38  Line 38 
38      type ('t, 'n) arr                   (* 'n-sized array with 't elements *)      type ('t, 'n) arr                   (* 'n-sized array with 't elements *)
39    
40      (* light-weight alternative *)      (* light-weight alternative *)
41      type ('t, 'c) ptr'      eqtype ('t, 'c) ptr'
42    
43      (* void* and function pointers *)      (* void* and function pointers *)
44      type voidptr                        (* C's void* *)      eqtype voidptr                      (* C's void* *)
45      type 'f fptr                        (* a function pointer *)      type 'f fptr                        (* a function pointer *)
46    
47      (* alt *)      (* alt *)
48      type 'f fptr'      eqtype 'f fptr'
49    
50      (* structures and unions *)      (* structures and unions *)
51      type 'tag su                        (* struct/union named 'tag;      type 'tag su                        (* struct/union named 'tag;
# Line 53  Line 53 
53                                           * defined in the Tag module *)                                           * defined in the Tag module *)
54    
55      (* primtypes (signed/unsigned char, int, short, long; float, double) *)      (* primtypes (signed/unsigned char, int, short, long; float, double) *)
56      type schar  and uchar      eqtype schar  and uchar
57      type sint   and uint      eqtype sint   and uint
58      type sshort and ushort      eqtype sshort and ushort
59      type slong  and ulong      eqtype slong  and ulong
60      type float  and double      type float  and double
61    
62      (* going from abstract to concrete and vice versa *)      (* going from abstract to concrete and vice versa *)
# Line 117  Line 117 
117      type ('s, 'c) su_obj' = ('s su, 'c) obj'      type ('s, 'c) su_obj' = ('s su, 'c) obj'
118    
119      (* bitfields aren't "ordinary objects", so they have their own type *)      (* bitfields aren't "ordinary objects", so they have their own type *)
120      type 'c sbf and 'c ubf      eqtype 'c sbf and 'c ubf
121    
122      (*      (*
123       * A family of types and corresponding values representing natural numbers.       * A family of types and corresponding values representing natural numbers.
# Line 442  Line 442 
442          (* the "light" NULL pointer is simply a polymorphic constant *)          (* the "light" NULL pointer is simply a polymorphic constant *)
443          val null' : ('t, 'c) ptr'          val null' : ('t, 'c) ptr'
444    
445            (* fptr version of NULL *)
446            val fnull : 'f fptr T.typ -> 'f fptr
447    
448            (* again, "light" version is simply a polymorphic constant *)
449            val fnull' : 'f fptr'
450    
451          (* checking for NULL pointer *)          (* checking for NULL pointer *)
452          val vIsNull : voidptr -> bool          val vIsNull : voidptr -> bool
453    
# Line 451  Line 457 
457          (* alt *)          (* alt *)
458          val isNull' : ('t, 'c) ptr' -> bool          val isNull' : ('t, 'c) ptr' -> bool
459    
460            (* checking a function pointer for NULL *)
461            val isFNull : 'f fptr -> bool
462    
463            (* alt *)
464            val isFNull' : 'f fptr' -> bool
465    
466          (* pointer arithmetic *)          (* pointer arithmetic *)
467          val |+| : ('t, 'c) ptr * int -> ('t, 'c) ptr          val |+| : ('t, 'c) ptr * int -> ('t, 'c) ptr
468          val |-| : ('t, 'c) ptr * ('t, 'c) ptr -> int          val |-| : ('t, 'c) ptr * ('t, 'c) ptr -> int

Legend:
Removed from v.1021  
changed lines
  Added in v.1031

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0